Commit 4633b391 authored by Yang Yingliang's avatar Yang Yingliang Committed by Jakub Kicinski

net: mdio: mux-multiplexer: Switch to use dev_err_probe() helper

dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220915065043.665138-3-yangyingliang@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 770aac8d
......@@ -72,12 +72,9 @@ static int mdio_mux_multiplexer_probe(struct platform_device *pdev)
return -ENOMEM;
s->muxc = devm_mux_control_get(dev, NULL);
if (IS_ERR(s->muxc)) {
ret = PTR_ERR(s->muxc);
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "Failed to get mux: %d\n", ret);
return ret;
}
if (IS_ERR(s->muxc))
return dev_err_probe(&pdev->dev, PTR_ERR(s->muxc),
"Failed to get mux\n");
platform_set_drvdata(pdev, s);
......
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