[PATCH] net: dwmac-rk: No need to check the return value of the phy_power_on()
李哲
sensor1010 at 163.com
Mon May 26 09:16:21 PDT 2025
since the return value of the phy_power_on() function is always 0,
checking its return value is redundant.
Signed-off-by: 李哲 <sensor1010 at 163.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 700858ff6f7c..6e8b10fda24d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1839,11 +1839,7 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
dev_err(dev, "NO interface defined!\n");
}
- ret = phy_power_on(bsp_priv, true);
- if (ret) {
- gmac_clk_enable(bsp_priv, false);
- return ret;
- }
+ phy_power_on(bsp_priv, true);
pm_runtime_get_sync(dev);
--
2.17.1
More information about the linux-arm-kernel
mailing list