Browse Source

PM / devfreq: Fix incorrect argument in error message

'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>
Sachin Kamat 12 years ago
parent
commit
b9e1c8e821
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/devfreq/devfreq.c

+ 1 - 1
drivers/devfreq/devfreq.c

@@ -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;
 	}