[net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe

Christophe Roullier christophe.roullier at foss.st.com
Mon Aug 10 08:07:49 PDT 2026


In case of error during stmmac_mdio_register, pm_runtime is not
cleaning before exit probe.

Signed-off-by: Christophe Roullier <christophe.roullier at foss.st.com>
Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b2b7d0242dd3c..37d06fc6dba47 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -8080,6 +8080,8 @@ static int __stmmac_dvr_probe(struct device *device,
 error_pcs_setup:
 	stmmac_mdio_unregister(ndev);
 error_mdio_register:
+	pm_runtime_put_sync(device);
+	pm_runtime_disable(device);
 	stmmac_napi_del(ndev);
 error_hw_init:
 	destroy_workqueue(priv->wq);
-- 
2.43.0




More information about the linux-arm-kernel mailing list