aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-07-06 07:07:58 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-08-28 16:14:54 -0400
commit36dd5acd196574d41de3e81d8264df475bbb7123 (patch)
tree1a21dec2756280b529c3f51a4f9bb7e4cfa7938b /drivers/scsi
parente35d7f27fbd51a09a41a5439e39f22a3d102c00b (diff)
aic94xx: Skip reading user settings if flash is not found
If no user settings are found it's pointless trying to read them from flash. So skip that step. This also fixes a compilation warning about uninitialized variables in aic94xx. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_sds.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index edb43fda9f36..c831e30411fa 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
983{ 983{
984 int err, i; 984 int err, i;
985 u32 offs, size; 985 u32 offs, size;
986 struct asd_ll_el *el; 986 struct asd_ll_el *el = NULL;
987 struct asd_ctrla_phy_settings *ps; 987 struct asd_ctrla_phy_settings *ps;
988 struct asd_ctrla_phy_settings dflt_ps; 988 struct asd_ctrla_phy_settings dflt_ps;
989 989
@@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
1004 1004
1005 size = sizeof(struct asd_ctrla_phy_settings); 1005 size = sizeof(struct asd_ctrla_phy_settings);
1006 ps = &dflt_ps; 1006 ps = &dflt_ps;
1007 goto out_process;
1007 } 1008 }
1008 1009
1009 if (size == 0) 1010 if (size == 0)
@@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
1028 ASD_DPRINTK("couldn't find ctrla phy settings struct\n"); 1029 ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
1029 goto out2; 1030 goto out2;
1030 } 1031 }
1031 1032out_process:
1032 err = asd_process_ctrla_phy_settings(asd_ha, ps); 1033 err = asd_process_ctrla_phy_settings(asd_ha, ps);
1033 if (err) { 1034 if (err) {
1034 ASD_DPRINTK("couldn't process ctrla phy settings\n"); 1035 ASD_DPRINTK("couldn't process ctrla phy settings\n");