All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <hauke@hauke-m.de>,
	<andrew@lunn.ch>, <peppe.cavallaro@st.com>,
	<alexandre.torgue@foss.st.com>
Subject: [PATCH -next 6/7] net: stmmac: dwc-qos: Switch to use dev_err_probe() helper
Date: Thu, 15 Sep 2022 19:42:13 +0800	[thread overview]
Message-ID: <20220915114214.3145427-7-yangyingliang@huawei.com> (raw)
In-Reply-To: <20220915114214.3145427-1-yangyingliang@huawei.com>

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>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
index 358fc26f8d1f..80efdeeb0b59 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -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;
 	}
-- 
2.25.1


  parent reply	other threads:[~2022-09-15 11:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 11:42 [PATCH -next 0/7] net: drivers: Switch to use dev_err_probe() helper Yang Yingliang
2022-09-15 11:42 ` [PATCH -next 1/7] net: ethernet: ti: am65-cpts: " Yang Yingliang
2022-09-15 11:42 ` [PATCH -next 2/7] net: ethernet: ti: cpsw: " Yang Yingliang
2022-09-15 11:42 ` [PATCH -next 3/7] net: ethernet: ti: cpsw_new: " Yang Yingliang
2022-09-15 11:42 ` [PATCH -next 4/7] net: dsa: lantiq: " Yang Yingliang
2022-09-20 23:49   ` Vladimir Oltean
2022-09-15 11:42 ` [PATCH -next 5/7] net: ibm: emac: " Yang Yingliang
2022-09-15 11:42 ` Yang Yingliang [this message]
2022-09-15 11:42 ` [PATCH -next 7/7] net: ll_temac: " Yang Yingliang
2022-09-21 13:20 ` [PATCH -next 0/7] net: drivers: " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220915114214.3145427-7-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hauke@hauke-m.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.