Browse Source

cpufreq: exynos5440: Fix potential NULL pointer dereference

If 'dvfs_info' is NULL (due to devm_kzalloc failure) the failure
error message would try to dereference it. Use 'pdev' instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Sachin Kamat 11 years ago
parent
commit
116decb7e4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/cpufreq/exynos5440-cpufreq.c

+ 1 - 1
drivers/cpufreq/exynos5440-cpufreq.c

@@ -457,7 +457,7 @@ err_free_table:
 	opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table);
 err_put_node:
 	of_node_put(np);
-	dev_err(dvfs_info->dev, "%s: failed initialization\n", __func__);
+	dev_err(&pdev->dev, "%s: failed initialization\n", __func__);
 	return ret;
 }