net: ethernet: ti: cpsw: 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>
This commit is contained in:
parent
e2baa12608
commit
102947f9bb
@ -1319,8 +1319,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
|
|||||||
*/
|
*/
|
||||||
ret = of_phy_register_fixed_link(slave_node);
|
ret = of_phy_register_fixed_link(slave_node);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (ret != -EPROBE_DEFER)
|
dev_err_probe(&pdev->dev, ret, "failed to register fixed-link phy\n");
|
||||||
dev_err(&pdev->dev, "failed to register fixed-link phy: %d\n", ret);
|
|
||||||
goto err_node_put;
|
goto err_node_put;
|
||||||
}
|
}
|
||||||
slave_data->phy_node = of_node_get(slave_node);
|
slave_data->phy_node = of_node_get(slave_node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user