lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202312201059100522230@zte.com.cn>
Date: Wed, 20 Dec 2023 10:59:10 +0800 (CST)
From: <yang.guang5@....com.cn>
To: <lee@...nel.org>
Cc: <jiang.xuexin@....com.cn>, <chen.haonan2@....com.cn>, <cgel.zte@...il.com>,
        <patches@...nsource.cirrus.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] mfd: wm8994: Switch to use dev_err_probe() helper

From: Yang Guang <yang.guang5@....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@....com.cn>
---
 drivers/mfd/wm8994-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index d5ac066f9db4..c43273527425 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -378,10 +378,8 @@ 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);
+	if (ret != 0) {
+		dev_err_probe(wm8994->dev, ret, "Failed to get supplies\n");
 		goto err;
 	}

-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ