diff options
Diffstat (limited to 'target/linux/generic/files/drivers')
5 files changed, 17 insertions, 13 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c index c0cb680e23..2c4d53fc67 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c @@ -1553,8 +1553,8 @@ int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi) smi->ext_mbus = of_mdio_find_bus(mdio_node); if (!smi->ext_mbus) { - dev_err(&pdev->dev, - "cannot find mdio bus from bus handle"); + dev_info(&pdev->dev, + "cannot find mdio bus from bus handle (yet)"); goto try_gpio; } @@ -1562,8 +1562,12 @@ int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi) try_gpio: if (!gpio_is_valid(sck) || !gpio_is_valid(sda)) { - dev_err(&pdev->dev, "gpios missing in devictree\n"); - return -EINVAL; + if (!mdio_node) { + dev_err(&pdev->dev, "gpios missing in devictree\n"); + return -EINVAL; + } else { + return -EPROBE_DEFER; + } } smi->gpio_sda = sda; @@ -1619,7 +1623,7 @@ struct rtl8366_smi *rtl8366_smi_probe(struct platform_device *pdev) free_smi: kfree(smi); - return NULL; + return ERR_PTR(err); } EXPORT_SYMBOL_GPL(rtl8366_smi_probe); diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c index dc394c02b6..0e0116051a 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c @@ -1445,8 +1445,8 @@ static int rtl8366rb_probe(struct platform_device *pdev) " version " RTL8366RB_DRIVER_VER"\n"); smi = rtl8366_smi_probe(pdev); - if (!smi) - return -ENODEV; + if (IS_ERR(smi)) + return PTR_ERR(smi); smi->clk_delay = 10; smi->cmd_read = 0xa9; diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c index 3f458f9dec..8c746778b8 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c @@ -1233,8 +1233,8 @@ static int rtl8366s_probe(struct platform_device *pdev) " version " RTL8366S_DRIVER_VER"\n"); smi = rtl8366_smi_probe(pdev); - if (!smi) - return -ENODEV; + if (IS_ERR(smi)) + return PTR_ERR(smi); smi->clk_delay = 10; smi->cmd_read = 0xa9; diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367.c b/target/linux/generic/files/drivers/net/phy/rtl8367.c index 9549961d76..7f0569d038 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8367.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8367.c @@ -1752,8 +1752,8 @@ static int rtl8367_probe(struct platform_device *pdev) int err; smi = rtl8366_smi_probe(pdev); - if (!smi) - return -ENODEV; + if (IS_ERR(smi)) + return PTR_ERR(smi); smi->clk_delay = 1500; smi->cmd_read = 0xb9; diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367b.c b/target/linux/generic/files/drivers/net/phy/rtl8367b.c index e6ea6509ae..cd8de810b5 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8367b.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8367b.c @@ -1527,8 +1527,8 @@ static int rtl8367b_probe(struct platform_device *pdev) int err; smi = rtl8366_smi_probe(pdev); - if (!smi) - return -ENODEV; + if (IS_ERR(smi)) + return PTR_ERR(smi); smi->clk_delay = 1500; smi->cmd_read = 0xb9; |