]> git.hungrycats.org Git - linux/commitdiff
PM / devfreq: Fix governor_store()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Mon, 21 Sep 2015 18:23:52 +0000 (20:23 +0200)
committerJiri Slaby <jslaby@suse.cz>
Tue, 5 Jan 2016 17:37:46 +0000 (18:37 +0100)
commit 14a21e7ba8cf6eab968310c92ca19a00f13ce3d9 upstream.

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>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/devfreq/devfreq.c

index c99c00d35d34f73d7ceca6cbf1e68b163fcc502a..ab1cec5548f0a9dd661d46f02bcddc3142d1247b 100644 (file)
@@ -730,8 +730,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);