40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 1f5669efca65564c7533704917f79003c6b36c9c Mon Sep 17 00:00:00 2001
|
||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||
Date: Mon, 22 Apr 2024 10:15:15 +0300
|
||
Subject: [PATCH 08/15] net: dsa: mt7530: return mt7530_setup_mdio &
|
||
mt7531_setup_common on error
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
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: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||
---
|
||
drivers/net/dsa/mt7530.c | 6 +++++-
|
||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
||
--- a/drivers/net/dsa/mt7530.c
|
||
+++ b/drivers/net/dsa/mt7530.c
|
||
@@ -2658,7 +2658,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);
|
||
@@ -3017,6 +3019,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++) {
|