From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Haowen Bai <baihaowen@meizu.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Michel Pollet <michel.pollet@bp.renesas.com>,
<linux-rtc@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: rzn1: Fix inconsistent IS_ERR and PTR_ERR
Date: Tue, 24 May 2022 09:19:30 +0200 [thread overview]
Message-ID: <20220524091930.51e2a7ef@xps-13> (raw)
In-Reply-To: <1653372586-24736-1-git-send-email-baihaowen@meizu.com>
Hi Haowen,
baihaowen@meizu.com wrote on Tue, 24 May 2022 14:09:45 +0800:
> The proper pointer to be passed as argument is rtc->rtcdev.
> Detected using Coccinelle.
>
> Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver")
Thanks for your patch. This has already been reported twice,
Alexandre will likely apply one of the fixes after the merge window.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.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;
Thanks,
Miquèl
next prev parent reply other threads:[~2022-05-24 7:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 6:09 [PATCH] rtc: rzn1: Fix inconsistent IS_ERR and PTR_ERR Haowen Bai
2022-05-24 7:19 ` Miquel Raynal [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-23 1:57 [PATCH] rtc: rzn1: fix " Ziyang Xuan
2022-05-23 7:58 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220524091930.51e2a7ef@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=baihaowen@meizu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=michel.pollet@bp.renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.