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: <20250327115249185_vgGyzfhDZjf43eXFwKqX@zte.com.cn>
Date: Thu, 27 Mar 2025 11:52:49 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <laurent.pinchart@...asonboard.com>
Cc: <andrzej.hajda@...el.com>, <neil.armstrong@...aro.org>, <rfoss@...nel.org>,
        <laurent.pinchart@...asonboard.com>, <jonas@...boo.se>,
        <jernej.skrabec@...il.com>, <yang.yang29@....com.cn>,
        <xu.xin16@....com.cn>, <ye.xingchen@....com.cn>,
        <linux-kernel@...r.kernel.org>, <zhang.enpei@....com.cn>
Subject: [PATCH v2] drm/bridge: thc63lvd1024: Use dev_err_probe()

From: Zhang Enpei <zhang.enpei@....com.cn>

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Zhang Enpei <zhang.enpei@....com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
---
v2:
	- reduce a PTR_ERR call since dev_err_probe() will add
	  the error value to the message
 drivers/gpu/drm/bridge/thc63lvd1024.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c
index bba10cf9b4f9..8f3096fa3dd7 100644
--- a/drivers/gpu/drm/bridge/thc63lvd1024.c
+++ b/drivers/gpu/drm/bridge/thc63lvd1024.c
@@ -188,14 +188,9 @@ static int thc63_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, thc63);

 	thc63->vcc = devm_regulator_get(thc63->dev, "vcc");
-	if (IS_ERR(thc63->vcc)) {
-		if (PTR_ERR(thc63->vcc) == -EPROBE_DEFER)
-			return -EPROBE_DEFER;
-
-		dev_err(thc63->dev, "Unable to get \"vcc\" supply: %ld\n",
-			PTR_ERR(thc63->vcc));
-		return PTR_ERR(thc63->vcc);
-	}
+	if (IS_ERR(thc63->vcc))
+		return dev_err_probe(thc63->dev, PTR_ERR(thc63->vcc),
+				     "Unable to get \"vcc\" supply\n");

 	ret = thc63_gpio_init(thc63);
 	if (ret)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ