Commit 9ab24b04 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Viresh Kumar
Browse files

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: f41e1442 ("cpufreq: tegra194: add OPP support and set bandwidth")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarSumit Gupta <sumitg@nvidia.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 4b4c0d37
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);