Commit 770aac8d authored by Yang Yingliang's avatar Yang Yingliang Committed by Jakub Kicinski

net: mdio: mux-mmioreg: 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-2-yangyingliang@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent de0665c8
......@@ -159,12 +159,9 @@ static int mdio_mux_mmioreg_probe(struct platform_device *pdev)
ret = mdio_mux_init(&pdev->dev, pdev->dev.of_node,
mdio_mux_mmioreg_switch_fn,
&s->mux_handle, s, NULL);
if (ret) {
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
if (ret)
return dev_err_probe(&pdev->dev, ret,
"failed to register mdio-mux bus %pOF\n", np);
return ret;
}
pdev->dev.platform_data = 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