summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/b53/b53_mdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/dsa/b53/b53_mdio.c')
-rw-r--r--drivers/net/dsa/b53/b53_mdio.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/dsa/b53/b53_mdio.c b/drivers/net/dsa/b53/b53_mdio.c
index 897e5e8b3d69..31d070bf161a 100644
--- a/drivers/net/dsa/b53/b53_mdio.c
+++ b/drivers/net/dsa/b53/b53_mdio.c
@@ -343,10 +343,9 @@ static int b53_mdio_probe(struct mdio_device *mdiodev)
dev_set_drvdata(&mdiodev->dev, dev);
ret = b53_switch_register(dev);
- if (ret) {
- dev_err(&mdiodev->dev, "failed to register switch: %i\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(&mdiodev->dev, ret,
+ "failed to register switch\n");
return ret;
}