Commit 7bf06bcd authored by Arınç ÜNAL's avatar Arınç ÜNAL Committed by David S. Miller

net: dsa: mt7530: return mt7530_setup_mdio & mt7531_setup_common on error

The mt7530_setup_mdio() and mt7531_setup_common() functions should be
checked for errors. Return if the functions return a non-zero value.
Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 377174c5
......@@ -2667,7 +2667,9 @@ mt7531_setup(struct dsa_switch *ds)
0);
}
mt7531_setup_common(ds);
ret = mt7531_setup_common(ds);
if (ret)
return ret;
/* Setup VLAN ID 0 for VLAN-unaware bridges */
ret = mt7530_setup_vlan0(priv);
......@@ -3020,6 +3022,8 @@ mt753x_setup(struct dsa_switch *ds)
ret = mt7530_setup_mdio(priv);
if (ret && priv->irq)
mt7530_free_irq_common(priv);
if (ret)
return ret;
/* Initialise the PCS devices */
for (i = 0; i < priv->ds->num_ports; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment