diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-15 14:50:42 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-20 08:41:19 -0700 |
commit | 770aac8dc05de86d3e56d8fa5a47d74c0d9ca50f (patch) | |
tree | a85ffa661759f01662c9421c52a165c0e32c028c /drivers/net/mdio | |
parent | de0665c871b7cdcf5661649c6bc5b863ece94a35 (diff) |
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: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220915065043.665138-2-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/mdio')
-rw-r--r-- | drivers/net/mdio/mdio-mux-mmioreg.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/mdio/mdio-mux-mmioreg.c b/drivers/net/mdio/mdio-mux-mmioreg.c index c02fb2a067ee..c02c9c660016 100644 --- a/drivers/net/mdio/mdio-mux-mmioreg.c +++ b/drivers/net/mdio/mdio-mux-mmioreg.c @@ -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, - "failed to register mdio-mux bus %pOF\n", np); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to register mdio-mux bus %pOF\n", np); pdev->dev.platform_data = s; |