]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.51/aic94xx-skip-reading-user-settings-if-flash-is-not-found.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.18.51 / aic94xx-skip-reading-user-settings-if-flash-is-not-found.patch
CommitLineData
c67f608e
GKH
1From 36dd5acd196574d41de3e81d8264df475bbb7123 Mon Sep 17 00:00:00 2001
2From: Hannes Reinecke <hare@suse.de>
3Date: Mon, 6 Jul 2015 13:07:58 +0200
4Subject: aic94xx: Skip reading user settings if flash is not found
5
6From: Hannes Reinecke <hare@suse.de>
7
8commit 36dd5acd196574d41de3e81d8264df475bbb7123 upstream.
9
10If no user settings are found it's pointless trying to
11read them from flash. So skip that step.
12This also fixes a compilation warning about uninitialized variables in
13aic94xx.
14
15Signed-off-by: Hannes Reinecke <hare@suse.de>
16Reviewed-by: Christoph Hellwig <hch@lst.de>
17Signed-off-by: James Bottomley <JBottomley@Odin.com>
18Cc: Arnd Bergmann <arnd@arndb.de>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 drivers/scsi/aic94xx/aic94xx_sds.c | 5 +++--
23 1 file changed, 3 insertions(+), 2 deletions(-)
24
25--- a/drivers/scsi/aic94xx/aic94xx_sds.c
26+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
27@@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struc
28 {
29 int err, i;
30 u32 offs, size;
31- struct asd_ll_el *el;
32+ struct asd_ll_el *el = NULL;
33 struct asd_ctrla_phy_settings *ps;
34 struct asd_ctrla_phy_settings dflt_ps;
35
36@@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struc
37
38 size = sizeof(struct asd_ctrla_phy_settings);
39 ps = &dflt_ps;
40+ goto out_process;
41 }
42
43 if (size == 0)
44@@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struc
45 ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
46 goto out2;
47 }
48-
49+out_process:
50 err = asd_process_ctrla_phy_settings(asd_ha, ps);
51 if (err) {
52 ASD_DPRINTK("couldn't process ctrla phy settings\n");