net: phy: mdio-mux: slience probe defer error
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 6 Mar 2018 11:10:45 +0000 (12:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Mar 2018 17:39:59 +0000 (12:39 -0500)
If we fail to register the mdio bus due to probe defer, we should not
print an error message. Just be silent in this case.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-mux-mmioreg.c

index 2573ab0..70f6115 100644 (file)
@@ -163,8 +163,9 @@ static int mdio_mux_mmioreg_probe(struct platform_device *pdev)
                            mdio_mux_mmioreg_switch_fn,
                            &s->mux_handle, s, NULL);
        if (ret) {
-               dev_err(&pdev->dev, "failed to register mdio-mux bus %pOF\n",
-                       np);
+               if (ret != -EPROBE_DEFER)
+                       dev_err(&pdev->dev,
+                               "failed to register mdio-mux bus %pOF\n", np);
                return ret;
        }