提交 36dd5acd 编写于 作者: H Hannes Reinecke 提交者: James Bottomley

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: NHannes Reinecke <hare@suse.de>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
上级 e35d7f27
...@@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha, ...@@ -983,7 +983,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
{ {
int err, i; int err, i;
u32 offs, size; 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 *ps;
struct asd_ctrla_phy_settings dflt_ps; struct asd_ctrla_phy_settings dflt_ps;
...@@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha, ...@@ -1004,6 +1004,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha,
size = sizeof(struct asd_ctrla_phy_settings); size = sizeof(struct asd_ctrla_phy_settings);
ps = &dflt_ps; ps = &dflt_ps;
goto out_process;
} }
if (size == 0) if (size == 0)
...@@ -1028,7 +1029,7 @@ static int asd_process_ctrl_a_user(struct asd_ha_struct *asd_ha, ...@@ -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"); ASD_DPRINTK("couldn't find ctrla phy settings struct\n");
goto out2; goto out2;
} }
out_process:
err = asd_process_ctrla_phy_settings(asd_ha, ps); err = asd_process_ctrla_phy_settings(asd_ha, ps);
if (err) { if (err) {
ASD_DPRINTK("couldn't process ctrla phy settings\n"); ASD_DPRINTK("couldn't process ctrla phy settings\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册