From: Sean Wang <[email protected]>

Return -ENODEV if the MDIO bus is disabled in the device tree.

Signed-off-by: Sean Wang <[email protected]>
Acked-by: John Crispin <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
---
 .../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
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to