]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PM / devfreq: Fix incorrect argument in error message
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 21 Nov 2012 05:06:13 +0000 (10:36 +0530)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 26 Nov 2012 10:17:48 +0000 (19:17 +0900)
'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>
drivers/devfreq/devfreq.c

index 1a78ad9e1bd09a4a001dbe4fa259b024bc19fe43..ac4334fac2c6e6c72d36e54112ff5df0bdd85be5 100644 (file)
@@ -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;
        }