Skip to contentSkip to conversation

net: ethernet: dwmac-sun8i: Use the correct function in exit path

PATCH Applied Corentin Labbe 2 participants 2 messages Nov 10, 2019 – Nov 12, 2019

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: dwmac-sun8i: Use the correct function in exit path

When PHY is not powered, the probe function fail and some resource are still unallocated.
Furthermore some BUG happens:
dwmac-sun8i 5020000.ethernet: EMAC reset timeout

------------[ cut here ]------------
kernel BUG at /linux-next/net/core/dev.c:9844!

So let's use the right function (stmmac_pltfr_remove) in the error path.

Fixes 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
Cc <[email protected]> # v4.15+
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -1
index eefb06d918c8..1c8d84ed8410 100644
@@ -1227,7 +1227,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
 dwmac_mux:
 	sun8i_dwmac_unset_syscon(gmac);
 dwmac_exit:
-	sun8i_dwmac_exit(pdev, plat_dat->bsp_priv);
+	stmmac_pltfr_remove(pdev);
 return ret;
 }
 
Signature · 1 line
2.23.0
maintainer Applied
#1 lore raw

From: Corentin Labbe <[email protected]>
Date: Sun, 10 Nov 2019 11:30:48 +0000

Quoted 4 lines

When PHY is not powered, the probe function fail and some resource are still unallocated.
Furthermore some BUG happens:
dwmac-sun8i 5020000.ethernet: EMAC reset timeout

Quoted 8 lines
------------[ cut here ]------------
kernel BUG at /linux-next/net/core/dev.c:9844!

So let's use the right function (stmmac_pltfr_remove) in the error path.

Fixes 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
Cc <[email protected]> # v4.15+

Applied.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel