diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-15 19:42:11 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-21 13:50:03 +0100 |
commit | d02bb8bef4576d4511425270e61617b13ec4c387 (patch) | |
tree | 81abf6b37fac2bd33de2bde5a81c8faf2582fc91 /drivers/net/dsa/lantiq_gswip.c | |
parent | 2c22e42edc8d18092a5ed7b77ab1a2996948a0ee (diff) | |
download | linux-stable-d02bb8bef4576d4511425270e61617b13ec4c387.tar.gz linux-stable-d02bb8bef4576d4511425270e61617b13ec4c387.tar.bz2 linux-stable-d02bb8bef4576d4511425270e61617b13ec4c387.zip |
net: dsa: lantiq: 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: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/lantiq_gswip.c')
-rw-r--r-- | drivers/net/dsa/lantiq_gswip.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index e531b93f3cb2..88f95d6e41c9 100644 --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -1989,11 +1989,9 @@ static int gswip_gphy_fw_probe(struct gswip_priv *priv, } gphy_fw->reset = of_reset_control_array_get_exclusive(gphy_fw_np); - if (IS_ERR(gphy_fw->reset)) { - if (PTR_ERR(gphy_fw->reset) != -EPROBE_DEFER) - dev_err(dev, "Failed to lookup gphy reset\n"); - return PTR_ERR(gphy_fw->reset); - } + if (IS_ERR(gphy_fw->reset)) + return dev_err_probe(dev, PTR_ERR(gphy_fw->reset), + "Failed to lookup gphy reset\n"); return gswip_gphy_fw_load(priv, gphy_fw); } |