[PATCH 2/2] [PATCH net-next v2 2/2] net: stmmac: dwmac-rk:return actual error from phy_power_on

Lizhe sensor1010 at 163.com
Tue Dec 16 07:07:15 PST 2025


The function phy_power_on currently always returns 0, even when
regulator operations fail. This patch modifies it to return the
actual error code from regulator_enable/disable operations

Signed-off-by: Lizhe <sensor1010 at 163.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 2f5a65c235aa..fa989cb96714 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1514,7 +1514,7 @@ static int rk_phy_power_set(struct rk_priv_data *bsp_priv, bool enable)
 			dev_err(dev, "fail to disable phy-supply\n");
 	}
 
-	return 0;
+	return ret;
 }
 
 static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
-- 
2.17.1




More information about the linux-arm-kernel mailing list