Commit b6dc230f authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

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: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d02bb8be
...@@ -2979,11 +2979,9 @@ static int emac_init_config(struct emac_instance *dev) ...@@ -2979,11 +2979,9 @@ static int emac_init_config(struct emac_instance *dev)
/* Read MAC-address */ /* Read MAC-address */
err = of_get_ethdev_address(np, dev->ndev); err = of_get_ethdev_address(np, dev->ndev);
if (err) { if (err)
if (err != -EPROBE_DEFER) return dev_err_probe(&dev->ofdev->dev, err,
dev_err(&dev->ofdev->dev, "Can't get valid [local-]mac-address from OF !\n"); "Can't get valid [local-]mac-address from OF !\n");
return err;
}
/* IAHT and GAHT filter parameterization */ /* IAHT and GAHT filter parameterization */
if (emac_has_feature(dev, EMAC_FTR_EMAC4SYNC)) { if (emac_has_feature(dev, EMAC_FTR_EMAC4SYNC)) {
......
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