diff mbox series

[03/13] net: stmmac: dwmac-rk: Allow the driver to probe when phy-supply is not present

Message ID 20181125211907.9895-3-otavio@ossystems.com.br (mailing list archive)
State New, archived
Headers show
Series [01/13] ARM: multi_v7_defconfig: Select PHY_ROCKCHIP_INNO_USB2 | expand

Commit Message

Otavio Salvador Nov. 25, 2018, 9:18 p.m. UTC
The phy-supply is an optional regulator, so we should not treat
as an error when phy-supply is not passed in the device tree.

This allows the dwmac-rk driver to probe when phy-supply is not
present in the dts.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 7b923362ee55..73855622445b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1205,7 +1205,7 @@  static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
 
 	if (!ldo) {
 		dev_err(dev, "no regulator found\n");
-		return -1;
+		return 0;
 	}
 
 	if (enable) {