Skip to content

Commit

Permalink
net: ethernet: dwmac-sun8i: Use the correct function in exit path
Browse files Browse the repository at this point in the history
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: 9f93ac8 ("net-next: stmmac: Add dwmac-sun8i")
Cc: <stable@vger.kernel.org> # v4.15+
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Corentin Labbe authored and David S. Miller committed Nov 11, 2019
1 parent dd3d792 commit 40a1dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,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;
}

Expand Down

0 comments on commit 40a1dce

Please sign in to comment.