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:
parent
44cac5da6a
commit
9c9b504f06
1 changed files with 2 additions and 2 deletions
|
@ -70,8 +70,8 @@ static ssize_t store_##name(struct device *dev, \
|
||||||
int ret; \
|
int ret; \
|
||||||
unsigned int val; \
|
unsigned int val; \
|
||||||
ret = kstrtouint(buf, 10, &val); \
|
ret = kstrtouint(buf, 10, &val); \
|
||||||
if (ret != 1) \
|
if (ret) \
|
||||||
return -EINVAL; \
|
return ret; \
|
||||||
val = max(val, _min); \
|
val = max(val, _min); \
|
||||||
val = min(val, _max); \
|
val = min(val, _max); \
|
||||||
hw->name = val; \
|
hw->name = val; \
|
||||||
|
|
Loading…
Add table
Reference in a new issue