]>
Commit | Line | Data |
---|---|---|
c67f608e GKH |
1 | From 36dd5acd196574d41de3e81d8264df475bbb7123 Mon Sep 17 00:00:00 2001 |
2 | From: Hannes Reinecke <hare@suse.de> | |
3 | Date: Mon, 6 Jul 2015 13:07:58 +0200 | |
4 | Subject: aic94xx: Skip reading user settings if flash is not found | |
5 | ||
6 | From: Hannes Reinecke <hare@suse.de> | |
7 | ||
8 | commit 36dd5acd196574d41de3e81d8264df475bbb7123 upstream. | |
9 | ||
10 | If no user settings are found it's pointless trying to | |
11 | read them from flash. So skip that step. | |
12 | This also fixes a compilation warning about uninitialized variables in | |
13 | aic94xx. | |
14 | ||
15 | Signed-off-by: Hannes Reinecke <hare@suse.de> | |
16 | Reviewed-by: Christoph Hellwig <hch@lst.de> | |
17 | Signed-off-by: James Bottomley <JBottomley@Odin.com> | |
18 | Cc: Arnd Bergmann <arnd@arndb.de> | |
19 | Signed-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"); |