]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PM / devfreq: Fix governor_store()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Mon, 21 Sep 2015 18:23:52 +0000 (20:23 +0200)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 30 Sep 2015 05:16:31 +0000 (14:16 +0900)
Writing the currently set governor into sysfs currently
seems to fail.
Fix this by setting the return code to zero before
leaving governor_store().

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c

index 3927ed9fdbd51f16d765aede8fef14418994ab55..4f1b0cebe9a4c563a7d365c10a4d3787db93cb9f 100644 (file)
@@ -795,8 +795,10 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr,
                ret = PTR_ERR(governor);
                goto out;
        }
-       if (df->governor == governor)
+       if (df->governor == governor) {
+               ret = 0;
                goto out;
+       }
 
        if (df->governor) {
                ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL);