public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <yang.guang5@zte.com.cn>
To: <lee@kernel.org>
Cc: <jiang.xuexin@zte.com.cn>, <chen.haonan2@zte.com.cn>,
	<cgel.zte@gmail.com>, <patches@opensource.cirrus.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH linux-next] mfd: wm8994: Switch to use dev_err_probe() helper
Date: Thu, 14 Dec 2023 20:04:59 +0800 (CST)	[thread overview]
Message-ID: <202312142004599156569@zte.com.cn> (raw)

From: Yang Guang <yang.guang5@zte.com.cn>

dev_err() can be replace with dev_err_probe() which will
check if error code is -EPROBE_DEFER.

Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn>
---
 drivers/mfd/wm8994-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index d5ac066f9db4..8a4196dd927b 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -379,9 +379,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
 	ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies,
 				 wm8994->supplies);
 	if (ret != 0) {
-		if (ret != -EPROBE_DEFER)
-			dev_err(wm8994->dev, "Failed to get supplies: %d\n",
-				ret);
+		dev_err_probe(wm8994->dev, ret, "Failed to get supplies: %d\n");
 		goto err;
 	}

-- 
2.25.1

             reply	other threads:[~2023-12-14 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 12:04 yang.guang5 [this message]
2023-12-16 20:10 ` [PATCH linux-next] mfd: wm8994: Switch to use dev_err_probe() helper kernel test robot
2023-12-16 21:26 ` kernel test robot

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=202312142004599156569@zte.com.cn \
    --to=yang.guang5@zte.com.cn \
    --cc=cgel.zte@gmail.com \
    --cc=chen.haonan2@zte.com.cn \
    --cc=jiang.xuexin@zte.com.cn \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox