Skip to content

Commit

Permalink
cpufreq: exynos5440: Fix potential NULL pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Rafael J. Wysocki committed Sep 25, 2013
1 parent 26ca869 commit 116decb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/exynos5440-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
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;
}

Expand Down

0 comments on commit 116decb

Please sign in to comment.