sun8i_dwmac_unpower_internal_phy already checks if the PHY is powered,
so there is no need to do it again here.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 8e505019adf8..3c3d0b99d3e8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1018,10 +1018,8 @@ static void sun8i_dwmac_exit(struct platform_device 
*pdev, void *priv)
 {
        struct sunxi_priv_data *gmac = priv;
 
-       if (gmac->variant->soc_has_internal_phy) {
-               if (gmac->internal_phy_powered)
-                       sun8i_dwmac_unpower_internal_phy(gmac);
-       }
+       if (gmac->variant->soc_has_internal_phy)
+               sun8i_dwmac_unpower_internal_phy(gmac);
 
        clk_disable_unprepare(gmac->tx_clk);
 
-- 
2.26.2

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20210103112542.35149-3-samuel%40sholland.org.

Reply via email to