From: Dan Carpenter Date: Thu, 19 May 2022 13:56:19 +0000 (+0300) Subject: rtc: rzn1: Fix error code in probe X-Git-Tag: v6.6.17~7371^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b6da785130d9e8cf33d001a7bf08a979c87d019;p=platform%2Fkernel%2Flinux-rpi.git rtc: rzn1: Fix error code in probe 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 Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/YoZMg1dmHHSJEfE9@kili --- diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c index 1108d98..18f33ca 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;