lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221107104916.64dc26d4@xps-13>
Date:   Mon, 7 Nov 2022 10:49:16 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     zys.zljxml@...il.com
Cc:     a.zummo@...ertech.it, alexandre.belloni@...tlin.com,
        michel.pollet@...renesas.com, linux-rtc@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Yushan Zhou <katrinzhou@...cent.com>
Subject: Re: [PATCH] rtc: rzn1: Check return value in rzn1_rtc_probe

Hello,

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

> From: Yushan Zhou <katrinzhou@...cent.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@...cent.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@...tlin.com>

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ