Skip to content

Commit

Permalink
aic94xx: Skip reading user settings if flash is not found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Reinecke authored and James Bottomley committed Aug 28, 2015
1 parent e35d7f2 commit 36dd5ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/scsi/aic94xx/aic94xx_sds.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
{
int err, i;
u32 offs, size;
struct asd_ll_el *el;
struct asd_ll_el *el = NULL;
struct asd_ctrla_phy_settings *ps;
struct asd_ctrla_phy_settings dflt_ps;

Expand All @@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,

size = sizeof(struct asd_ctrla_phy_settings);
ps = &dflt_ps;
goto out_process;
}

if (size == 0)
Expand All @@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
goto out2;
}

out_process:
err = asd_process_ctrla_phy_settings(asd_ha, ps);
if (err) {
ASD_DPRINTK("couldn't process ctrla phy settings\n");
Expand Down

0 comments on commit 36dd5ac

Please sign in to comment.