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: <20240828122507.1323928-1-11162571@vivo.com>
Date: Wed, 28 Aug 2024 20:25:07 +0800
From: Yang Ruibin <11162571@...o.com>
To: Krzysztof Kozlowski <krzk@...nel.org>,
	Alexandre Belloni <alexandre.belloni@...tlin.com>,
	linux-arm-kernel@...ts.infradead.org,
	linux-rtc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com,
	Yang Ruibin <11162571@...o.com>
Subject: [PATCH v1] rtc: rtc-asm9260: Switch to use dev_err_probe()

use dev_err_probe() instead of dev_err() to simplify the error path and
standardize the format of the error code.

Signed-off-by: Yang Ruibin <11162571@...o.com>
---
 drivers/rtc/rtc-asm9260.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index a83b47e0d..2b7058ebb 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -268,10 +268,8 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->clk);
 
 	ret = clk_prepare_enable(priv->clk);
-	if (ret) {
-		dev_err(dev, "Failed to enable clk!\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to prepare clk!\n");
 
 	ccr = ioread32(priv->iobase + HW_CCR);
 	/* if dev is not enabled, reset it */
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ