Skip to content

Commit

Permalink
net: stmmac: dwc-qos: Switch to use dev_err_probe() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and David S. Miller committed Sep 21, 2022
1 parent b6dc230 commit c222cd2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,7 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)

ret = data->probe(pdev, plat_dat, &stmmac_res);
if (ret < 0) {
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "failed to probe subdriver: %d\n",
ret);
dev_err_probe(&pdev->dev, ret, "failed to probe subdriver\n");

goto remove_config;
}
Expand Down

0 comments on commit c222cd2

Please sign in to comment.