summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>2015-09-21 20:23:52 +0200
committerMyungJoo Ham <myungjoo.ham@samsung.com>2015-09-30 14:16:31 +0900
commit14a21e7ba8cf6eab968310c92ca19a00f13ce3d9 (patch)
tree32f30ab8d732088d0e818d26c2ce985430a25e65 /drivers/devfreq
parent9ffecb10283508260936b96022d4ee43a7798b4c (diff)
downloadlinux-14a21e7ba8cf6eab968310c92ca19a00f13ce3d9.tar.gz
linux-14a21e7ba8cf6eab968310c92ca19a00f13ce3d9.tar.bz2
linux-14a21e7ba8cf6eab968310c92ca19a00f13ce3d9.zip
PM / devfreq: Fix governor_store()
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>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 3927ed9fdbd5..4f1b0cebe9a4 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -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);