public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sumit Gupta <sumitg@nvidia.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	<linux-pm@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	Sumit Gupta <sumitg@nvidia.com>
Subject: Re: [PATCH] cpufreq: tegra194: Fix an error handling path in tegra194_cpufreq_probe()
Date: Fri, 28 Apr 2023 17:04:34 +0530	[thread overview]
Message-ID: <e16e96a2-cb81-ee1d-c3e9-fade09c59bd5@nvidia.com> (raw)
In-Reply-To: <30b17e2219abc3a9a137d28bb51e53732bba5103.1682428267.git.christophe.jaillet@wanadoo.fr>



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@wanadoo.fr>

Reviewed-by: Sumit Gupta <sumitg@nvidia.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
> 

  reply	other threads:[~2023-04-28 11:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 13:11 [PATCH] cpufreq: tegra194: Fix an error handling path in tegra194_cpufreq_probe() Christophe JAILLET
2023-04-28 11:34 ` Sumit Gupta [this message]
2023-05-02 10:30 ` Thierry Reding
2023-05-11  9:03 ` Viresh Kumar

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=e16e96a2-cb81-ee1d-c3e9-fade09c59bd5@nvidia.com \
    --to=sumitg@nvidia.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jonathanh@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=viresh.kumar@linaro.org \
    /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