[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e16e96a2-cb81-ee1d-c3e9-fade09c59bd5@nvidia.com>
Date: Fri, 28 Apr 2023 17:04:34 +0530
From: Sumit Gupta <sumitg@...dia.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>
CC: <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
Sumit Gupta <sumitg@...dia.com>
Subject: Re: [PATCH] cpufreq: tegra194: Fix an error handling path in
tegra194_cpufreq_probe()
On 25/04/23 18:41, Christophe JAILLET wrote:
> External email: Use caution opening links or attachments
>
>
> If the probe needs to be deferred, some resources still need to be
> released. So branch to the error handling path instead of returning
> directly.
>
> Fixes: f41e1442ac5b ("cpufreq: tegra194: add OPP support and set bandwidth")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Sumit Gupta <sumitg@...dia.com>
> ---
> Compile tested-only
> ---
> drivers/cpufreq/tegra194-cpufreq.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
> index c8d03346068a..36dad5ea5947 100644
> --- a/drivers/cpufreq/tegra194-cpufreq.c
> +++ b/drivers/cpufreq/tegra194-cpufreq.c
> @@ -686,8 +686,10 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev)
>
> /* Check for optional OPPv2 and interconnect paths on CPU0 to enable ICC scaling */
> cpu_dev = get_cpu_device(0);
> - if (!cpu_dev)
> - return -EPROBE_DEFER;
> + if (!cpu_dev) {
> + err = -EPROBE_DEFER;
> + goto err_free_res;
> + }
>
> if (dev_pm_opp_of_get_opp_desc_node(cpu_dev)) {
> err = dev_pm_opp_of_find_icc_paths(cpu_dev, NULL);
> --
> 2.34.1
>
Powered by blists - more mailing lists