aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>2015-09-21 14:23:52 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2015-09-30 01:16:31 -0400
commit14a21e7ba8cf6eab968310c92ca19a00f13ce3d9 (patch)
tree32f30ab8d732088d0e818d26c2ce985430a25e65 /drivers/devfreq
parent9ffecb10283508260936b96022d4ee43a7798b4c (diff)
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,
795 ret = PTR_ERR(governor); 795 ret = PTR_ERR(governor);
796 goto out; 796 goto out;
797 } 797 }
798 if (df->governor == governor) 798 if (df->governor == governor) {
799 ret = 0;
799 goto out; 800 goto out;
801 }
800 802
801 if (df->governor) { 803 if (df->governor) {
802 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); 804 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL);