Skip to content

Commit 9ab24b0

Browse files
tititiou36vireshk
authored andcommitted
cpufreq: tegra194: Fix an error handling path in tegra194_cpufreq_probe()
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: f41e144 ("cpufreq: tegra194: add OPP support and set bandwidth") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Sumit Gupta <sumitg@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 4b4c0d3 commit 9ab24b0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/cpufreq/tegra194-cpufreq.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,10 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev)
686686

687687
/* Check for optional OPPv2 and interconnect paths on CPU0 to enable ICC scaling */
688688
cpu_dev = get_cpu_device(0);
689-
if (!cpu_dev)
690-
return -EPROBE_DEFER;
689+
if (!cpu_dev) {
690+
err = -EPROBE_DEFER;
691+
goto err_free_res;
692+
}
691693

692694
if (dev_pm_opp_of_get_opp_desc_node(cpu_dev)) {
693695
err = dev_pm_opp_of_find_icc_paths(cpu_dev, NULL);

0 commit comments

Comments
 (0)