Commit 40a1dcee authored by Corentin Labbe's avatar Corentin Labbe Committed by David S. Miller

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: 9f93ac8d ("net-next: stmmac: Add dwmac-sun8i")
Cc: <stable@vger.kernel.org> # v4.15+
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dd3d792d
...@@ -1226,7 +1226,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev) ...@@ -1226,7 +1226,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
dwmac_mux: dwmac_mux:
sun8i_dwmac_unset_syscon(gmac); sun8i_dwmac_unset_syscon(gmac);
dwmac_exit: dwmac_exit:
sun8i_dwmac_exit(pdev, plat_dat->bsp_priv); stmmac_pltfr_remove(pdev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment