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] [day] [month] [year] [list]
Message-ID: <20231206061111.yim5ahpwdovirtzu@vireshk-i7>
Date:   Wed, 6 Dec 2023 11:41:11 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Alexandra Diupina <adiupina@...ralinux.ru>
Cc:     Sudeep Holla <sudeep.holla@....com>,
        Cristian Marussi <cristian.marussi@....com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH v2] cpufreq: scmi: process the result of
 devm_of_clk_add_hw_provider()

On 05-12-23, 18:12, Alexandra Diupina wrote:
> devm_of_clk_add_hw_provider() may return an errno, so
> add a return value check
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
> Signed-off-by: Alexandra Diupina <adiupina@...ralinux.ru>
> ---
> v2: replace dev_err() with dev_err_probe() as 
> Christophe JAILLET <christophe.jaillet@...adoo.fr> suggested
>  drivers/cpufreq/scmi-cpufreq.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
> index c8a7ccc42c16..4ee23f4ebf4a 100644
> --- a/drivers/cpufreq/scmi-cpufreq.c
> +++ b/drivers/cpufreq/scmi-cpufreq.c
> @@ -334,8 +334,11 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)
>  
>  #ifdef CONFIG_COMMON_CLK
>  	/* dummy clock provider as needed by OPP if clocks property is used */
> -	if (of_property_present(dev->of_node, "#clock-cells"))
> -		devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
> +	if (of_property_present(dev->of_node, "#clock-cells")) {
> +		ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
> +		if (ret)
> +			return dev_err_probe(dev, ret, "%s: registering clock provider failed\n", __func__);
> +	}
>  #endif
>  
>  	ret = cpufreq_register_driver(&scmi_cpufreq_driver);

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ