From: Yang Yingliang <yangyingliang@huawei.com>
To: <netdev@vger.kernel.org>
Cc: <andrew@lunn.ch>, <hkallweit1@gmail.com>, <davem@davemloft.net>,
<kuba@kernel.org>
Subject: [PATCH -next 3/3] net: mdio: mux-multiplexer: Switch to use dev_err_probe() helper
Date: Thu, 15 Sep 2022 14:50:43 +0800 [thread overview]
Message-ID: <20220915065043.665138-3-yangyingliang@huawei.com> (raw)
In-Reply-To: <20220915065043.665138-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/mdio/mdio-mux-multiplexer.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mdio/mdio-mux-multiplexer.c b/drivers/net/mdio/mdio-mux-multiplexer.c
index 527acfc3c045..bfa5af577b0a 100644
--- a/drivers/net/mdio/mdio-mux-multiplexer.c
+++ b/drivers/net/mdio/mdio-mux-multiplexer.c
@@ -72,12 +72,9 @@ static int mdio_mux_multiplexer_probe(struct platform_device *pdev)
return -ENOMEM;
s->muxc = devm_mux_control_get(dev, NULL);
- if (IS_ERR(s->muxc)) {
- ret = PTR_ERR(s->muxc);
- if (ret != -EPROBE_DEFER)
- dev_err(&pdev->dev, "Failed to get mux: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(s->muxc))
+ return dev_err_probe(&pdev->dev, PTR_ERR(s->muxc),
+ "Failed to get mux\n");
platform_set_drvdata(pdev, s);
--
2.25.1
next prev parent reply other threads:[~2022-09-15 6:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 6:50 [PATCH -next 1/3] net: mdio: mux-meson-g12a: Switch to use dev_err_probe() helper Yang Yingliang
2022-09-15 6:50 ` [PATCH -next 2/3] net: mdio: mux-mmioreg: " Yang Yingliang
2022-09-15 12:34 ` Andrew Lunn
2022-09-15 6:50 ` Yang Yingliang [this message]
2022-09-15 12:35 ` [PATCH -next 3/3] net: mdio: mux-multiplexer: " Andrew Lunn
2022-09-15 12:34 ` [PATCH -next 1/3] net: mdio: mux-meson-g12a: " Andrew Lunn
2022-09-20 15:50 ` 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=20220915065043.665138-3-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).