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

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

cpufreq: cpu-boost: Improve error checks for input_boost_freq



Avoid accepting input_boost_freq for non-existent CPUs

Change-Id: I82685426790310cc8de3ced0c7dadf5ce8337d0a
Signed-off-by: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 37d3257d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ static int set_input_boost_freq(const char *buf, const struct kernel_param *kp)
	for (i = 0; i < ntokens; i += 2) {
		if (sscanf(cp, "%u:%u", &cpu, &val) != 2)
			return -EINVAL;
		if (cpu > num_possible_cpus())
		if (cpu >= num_possible_cpus())
			return -EINVAL;

		per_cpu(sync_info, cpu).input_boost_freq = val;