[OpenWrt-Devel] [PATCH 4/5] net: ethernet: mediatek: fix error handling inside mtk_mdio_init
Rosen Penev
rosenp at gmail.com
Wed Jul 4 19:20:07 EDT 2018
From: Sean Wang <sean.wang at mediatek.com>
Return -ENODEV if the MDIO bus is disabled in the device tree.
Signed-off-by: Sean Wang <sean.wang at mediatek.com>
Acked-by: John Crispin <john at phrozen.org>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
.../ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
index 06f217af10..e2e79e185f 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
@@ -217,7 +217,7 @@ int fe_mdio_init(struct fe_priv *priv)
}
if (!of_device_is_available(mii_np)) {
- ret = 0;
+ ret = -ENODEV;
goto err_put_node;
}
--
2.17.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list