PM / devfreq: Fix the return value check in memlat governor

The return value of kstrtouint is erroneously checked while setting
the tunables for mem_latency governor due to which the tunables
cannot be changed from their default values.
This change rectifies that behavior.

Change-Id: Ief7dda4638ede2c97b26229f1188a1559b238920
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
This commit is contained in:
Rohit Gupta 2015-12-10 14:53:34 -08:00 committed by David Keitel
parent 44cac5da6a
commit 9c9b504f06

View file

@ -70,8 +70,8 @@ static ssize_t store_##name(struct device *dev, \
int ret; \
unsigned int val; \
ret = kstrtouint(buf, 10, &val); \
if (ret != 1) \
return -EINVAL; \
if (ret) \
return ret; \
val = max(val, _min); \
val = min(val, _max); \
hw->name = val; \