[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1175ee9c7ff738474585e2e08bd78f93623216f.1758528456.git.christophe.jaillet@wanadoo.fr>
Date: Mon, 22 Sep 2025 10:08:28 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Lennert Buytenhek <buytenh@...tstofly.org>,
Andy Fleming <afleming@...escale.com>
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
netdev@...r.kernel.org
Subject: [PATCH net v1] net: mv643xx_eth: Fix an error handling path in mv643xx_eth_probe()
If an error occurs after calling phy_connect_direct(), phy_disconnect()
should be called, as already done in the remove function.
Fixes: ed94493fb38a ("mv643xx_eth: convert to phylib")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
This patch is speculative and compile tested only.
Review with care.
---
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 0ab52c57c648..de6a683d7afc 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -3263,6 +3263,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
return 0;
out:
+ if (dev->phydev)
+ phy_disconnect(dev->phydev);
if (!IS_ERR(mp->clk))
clk_disable_unprepare(mp->clk);
free_netdev(dev);
--
2.51.0
Powered by blists - more mailing lists