kernel: generic backport 6.1: rename mistyped .patch file
[openwrt/openwrt.git] / target / linux / generic / pending-6.6 / 745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
1 From 1f5669efca65564c7533704917f79003c6b36c9c Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
3 Date: Mon, 22 Apr 2024 10:15:15 +0300
4 Subject: [PATCH 08/15] net: dsa: mt7530: return mt7530_setup_mdio &
5 mt7531_setup_common on error
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 The mt7530_setup_mdio() and mt7531_setup_common() functions should be
11 checked for errors. Return if the functions return a non-zero value.
12
13 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
14 ---
15 drivers/net/dsa/mt7530.c | 6 +++++-
16 1 file changed, 5 insertions(+), 1 deletion(-)
17
18 --- a/drivers/net/dsa/mt7530.c
19 +++ b/drivers/net/dsa/mt7530.c
20 @@ -2651,7 +2651,9 @@ mt7531_setup(struct dsa_switch *ds)
21 0);
22 }
23
24 - mt7531_setup_common(ds);
25 + ret = mt7531_setup_common(ds);
26 + if (ret)
27 + return ret;
28
29 /* Setup VLAN ID 0 for VLAN-unaware bridges */
30 ret = mt7530_setup_vlan0(priv);
31 @@ -3004,6 +3006,8 @@ mt753x_setup(struct dsa_switch *ds)
32 ret = mt7530_setup_mdio(priv);
33 if (ret && priv->irq)
34 mt7530_free_irq_common(priv);
35 + if (ret)
36 + return ret;
37
38 /* Initialise the PCS devices */
39 for (i = 0; i < priv->ds->num_ports; i++) {