diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-15 14:42:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-21 15:50:03 +0300 |
commit | 2c22e42edc8d18092a5ed7b77ab1a2996948a0ee (patch) | |
tree | 980ec757c758106ccac5ccc8b69f6c3168a9503e /drivers/net/ethernet/ti | |
parent | 102947f9bb9247ed45fb3dc9d8db96df05bc5ea0 (diff) | |
download | linux-2c22e42edc8d18092a5ed7b77ab1a2996948a0ee.tar.xz |
net: ethernet: ti: cpsw_new: 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>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_new.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c index 007de15179f0..14fd90da32fd 100644 --- a/drivers/net/ethernet/ti/cpsw_new.c +++ b/drivers/net/ethernet/ti/cpsw_new.c @@ -1288,9 +1288,8 @@ static int cpsw_probe_dt(struct cpsw_common *cpsw) if (of_phy_is_fixed_link(port_np)) { ret = of_phy_register_fixed_link(port_np); if (ret) { - if (ret != -EPROBE_DEFER) - dev_err(dev, "%pOF failed to register fixed-link phy: %d\n", - port_np, ret); + dev_err_probe(dev, ret, "%pOF failed to register fixed-link phy\n", + port_np); goto err_node_put; } slave_data->phy_node = of_node_get(port_np); |