Commit 4d36b2b1 authored by Florian Fainelli's avatar Florian Fainelli Committed by Jakub Kicinski

net: dsa: b53: Use dev_err_probe()

Rather than print an error even when we get -EPROBE_DEFER, use
dev_err_probe() to filter out those messages.

Link: https://github.com/openwrt/openwrt/pull/11680Signed-off-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240820004436.224603-1-florian.fainelli@broadcom.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bc3dd9ed
...@@ -343,10 +343,9 @@ static int b53_mdio_probe(struct mdio_device *mdiodev) ...@@ -343,10 +343,9 @@ static int b53_mdio_probe(struct mdio_device *mdiodev)
dev_set_drvdata(&mdiodev->dev, dev); dev_set_drvdata(&mdiodev->dev, dev);
ret = b53_switch_register(dev); ret = b53_switch_register(dev);
if (ret) { if (ret)
dev_err(&mdiodev->dev, "failed to register switch: %i\n", ret); return dev_err_probe(&mdiodev->dev, ret,
return ret; "failed to register switch\n");
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment