public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: zys.zljxml@gmail.com
Cc: a.zummo@towertech.it, alexandre.belloni@bootlin.com,
	michel.pollet@bp.renesas.com, linux-rtc@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yushan Zhou <katrinzhou@tencent.com>
Subject: Re: [PATCH] rtc: rzn1: Check return value in rzn1_rtc_probe
Date: Mon, 7 Nov 2022 10:49:16 +0100	[thread overview]
Message-ID: <20221107104916.64dc26d4@xps-13> (raw)
In-Reply-To: <20221107092544.3721053-1-zys.zljxml@gmail.com>

Hello,

zys.zljxml@gmail.com wrote on Mon,  7 Nov 2022 17:25:44 +0800:

> From: Yushan Zhou <katrinzhou@tencent.com>
> 
> The rzn1_rtc_probe() function utilizes devm_pm_runtime_enable()
> but wasn't checking the return value. Fix it by adding missing
> check.
> 
> Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver")
> 
> Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
> ---
>  drivers/rtc/rtc-rzn1.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c
> index ac788799c8e3..0d36bc50197c 100644
> --- a/drivers/rtc/rtc-rzn1.c
> +++ b/drivers/rtc/rtc-rzn1.c
> @@ -355,7 +355,9 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
>  	set_bit(RTC_FEATURE_ALARM_RES_MINUTE, rtc->rtcdev->features);
>  	clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->rtcdev->features);
>  
> -	devm_pm_runtime_enable(&pdev->dev);
> +	ret = devm_pm_runtime_enable(&pdev->dev);
> +	if (ret < 0)
> +		return ret;
>  	ret = pm_runtime_resume_and_get(&pdev->dev);
>  	if (ret < 0)
>  		return ret;

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

Thanks,
Miquèl

  reply	other threads:[~2022-11-07  9:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07  9:25 [PATCH] rtc: rzn1: Check return value in rzn1_rtc_probe zys.zljxml
2022-11-07  9:49 ` Miquel Raynal [this message]
2022-11-14 17:34 ` Alexandre Belloni

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=20221107104916.64dc26d4@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=katrinzhou@tencent.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 \
    --cc=zys.zljxml@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox