Skip to content

Commit

Permalink
PM / devfreq: Fix incorrect argument in error message
Browse files Browse the repository at this point in the history
'g' is cast to the error return code. Hence gives the following error
which is fixed by this patch.

drivers/devfreq/devfreq.c:645 devfreq_remove_governor() error:
'g' dereferencing possible ERR_PTR()

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
  • Loading branch information
Sachin Kamat authored and MyungJoo Ham committed Nov 26, 2012
1 parent 389baed commit b9e1c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/devfreq/devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
g = find_devfreq_governor(governor->name);
if (IS_ERR(g)) {
pr_err("%s: governor %s not registered\n", __func__,
g->name);
governor->name);
err = -EINVAL;
goto err_out;
}
Expand Down

0 comments on commit b9e1c8e

Please sign in to comment.