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: <1653372586-24736-1-git-send-email-baihaowen@meizu.com>
Date:   Tue, 24 May 2022 14:09:45 +0800
From:   Haowen Bai <baihaowen@...zu.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Michel Pollet <michel.pollet@...renesas.com>
CC:     Haowen Bai <baihaowen@...zu.com>, <linux-rtc@...r.kernel.org>,
        <linux-renesas-soc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] rtc: rzn1: Fix  inconsistent IS_ERR and PTR_ERR

The proper pointer to be passed as argument is rtc->rtcdev.
Detected using Coccinelle.

Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver")

Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
 drivers/rtc/rtc-rzn1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c
index f92d1398b0f1..4cf54af8a8c3 100644
--- a/drivers/rtc/rtc-rzn1.c
+++ b/drivers/rtc/rtc-rzn1.c
@@ -348,7 +348,7 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
 
 	rtc->rtcdev = devm_rtc_allocate_device(&pdev->dev);
 	if (IS_ERR(rtc->rtcdev))
-		return PTR_ERR(rtc);
+		return PTR_ERR(rtc->rtcdev);
 
 	rtc->rtcdev->range_min = RTC_TIMESTAMP_BEGIN_2000;
 	rtc->rtcdev->range_max = RTC_TIMESTAMP_END_2099;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ