All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: rzn1: Fix error code in probe
@ 2022-05-19 13:56 Dan Carpenter
  2022-05-19 14:08 ` Miquel Raynal
  2022-05-24 23:22 ` Alexandre Belloni
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-05-19 13:56 UTC (permalink / raw)
  To: Miquel Raynal, Michel Pollet
  Cc: Alessandro Zummo, Alexandre Belloni, linux-rtc,
	linux-renesas-soc, kernel-janitors

There is a copy and paste error so this code returns the wrong variable.

Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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 0b4bf6e43464..ff49cedd98b8 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.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-24 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 13:56 [PATCH] rtc: rzn1: Fix error code in probe Dan Carpenter
2022-05-19 14:08 ` Miquel Raynal
2022-05-19 14:26   ` Dan Carpenter
2022-05-24 23:22 ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.