From: Tobias Jakobi Date: Mon, 21 Sep 2015 18:23:52 +0000 (+0200) Subject: PM / devfreq: Fix governor_store() X-Git-Tag: v4.3-rc5~14^2~1^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14a21e7ba8cf6eab968310c92ca19a00f13ce3d9;p=karo-tx-linux.git 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 Signed-off-by: MyungJoo Ham --- 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);