Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d53647e0 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

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: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 22772af9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;							\