generic: rtl836x: support defered probe on mdio-bus
[openwrt/staging/lynxis.git] / target / linux / generic / files / drivers / net / phy / rtl8366rb.c
index dc394c02b6660cfc2fc419b70c534e0a6365d734..0e0116051a8cb377667124b08ae7ee4ede4a0d0b 100644 (file)
@@ -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;