diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-15 19:42:12 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-21 13:50:03 +0100 |
commit | b6dc230fba4b2c87a1eef55dd1562e53e92edefb (patch) | |
tree | a6172fbf1802842b31967e3fecd3ab3bb0a0cbff | |
parent | d02bb8bef4576d4511425270e61617b13ec4c387 (diff) | |
download | linux-stable-b6dc230fba4b2c87a1eef55dd1562e53e92edefb.tar.gz linux-stable-b6dc230fba4b2c87a1eef55dd1562e53e92edefb.tar.bz2 linux-stable-b6dc230fba4b2c87a1eef55dd1562e53e92edefb.zip |
net: ibm: emac: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ibm/emac/core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 0a4d04a8825d..9b08e41ccc29 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -2979,11 +2979,9 @@ static int emac_init_config(struct emac_instance *dev) /* Read MAC-address */ err = of_get_ethdev_address(np, dev->ndev); - if (err) { - if (err != -EPROBE_DEFER) - dev_err(&dev->ofdev->dev, "Can't get valid [local-]mac-address from OF !\n"); - return err; - } + if (err) + return dev_err_probe(&dev->ofdev->dev, err, + "Can't get valid [local-]mac-address from OF !\n"); /* IAHT and GAHT filter parameterization */ if (emac_has_feature(dev, EMAC_FTR_EMAC4SYNC)) { |