diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-05-19 16:56:19 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2022-05-25 01:22:16 +0200 |
commit | 0b6da785130d9e8cf33d001a7bf08a979c87d019 (patch) | |
tree | 65d2ea8f4e291a5a9ff1ae7d8f9621ed1ccd351d /drivers/rtc | |
parent | 64d69b5daf6fe9b86236d34e57ba8ebf7d84f245 (diff) | |
download | lwn-0b6da785130d9e8cf33d001a7bf08a979c87d019.tar.gz lwn-0b6da785130d9e8cf33d001a7bf08a979c87d019.zip |
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 <dan.carpenter@oracle.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/YoZMg1dmHHSJEfE9@kili
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-rzn1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c index 1108d98af86f..18f33ca62f6c 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; |