diff mbox series

rtc: rzn1: Fix error code in probe

Message ID YoZMg1dmHHSJEfE9@kili (mailing list archive)
State Mainlined
Commit 0b6da785130d9e8cf33d001a7bf08a979c87d019
Delegated to: Geert Uytterhoeven
Headers show
Series rtc: rzn1: Fix error code in probe | expand

Commit Message

Dan Carpenter May 19, 2022, 1:56 p.m. UTC
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(-)

Comments

Miquel Raynal May 19, 2022, 2:08 p.m. UTC | #1
Hi Dan,

dan.carpenter@oracle.com wrote on Thu, 19 May 2022 16:56:19 +0300:

> There is a copy and paste error so this code returns the wrong variable.
> 
> Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver")

The Fixes here will point to an unknown id once pulled by Linus.

Otherwise

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

> 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;


Thanks,
Miquèl
Dan Carpenter May 19, 2022, 2:26 p.m. UTC | #2
On Thu, May 19, 2022 at 04:08:21PM +0200, Miquel Raynal wrote:
> Hi Dan,
> 
> dan.carpenter@oracle.com wrote on Thu, 19 May 2022 16:56:19 +0300:
> 
> > There is a copy and paste error so this code returns the wrong variable.
> > 
> > Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver")
> 
> The Fixes here will point to an unknown id once pulled by Linus.

No, it shouldn't be an issue.

I'm assuming based on the S-o-b tags that this goes through Alexandre's
tree.  The hash will stay the same unless Alexandre rebases.

When a maintainer rebases then it's their responsibility to update the
Fixes tags.  Most likely the maintainer just going to fold the fixes
patches into the original patch so it's a moot issue.  There are
automated checks run on linux-next for incorrect Fixes tags so, you
know, don't rebase and then push immediately; first let the autobuilders
check for stuff like this.

regards,
dan carpenter
Alexandre Belloni May 24, 2022, 11:22 p.m. UTC | #3
On Thu, 19 May 2022 16:56:19 +0300, Dan Carpenter wrote:
> There is a copy and paste error so this code returns the wrong variable.
> 
> 

Applied, thanks!

[1/1] rtc: rzn1: Fix error code in probe
      commit: 0b6da785130d9e8cf33d001a7bf08a979c87d019

Best regards,
diff mbox series

Patch

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;