mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
msm_perf: Check on max_freq value to avoid invalid value
Check on max_freq value to avoid invalid value . Change-Id: If289191a350a58899b298cca9454ec5fbf2267ff Signed-off-by: Varun Garg <quic_gargv@quicinc.com> Signed-off-by: Badri Sampath <quic_badris@quicinc.com>
This commit is contained in:
parent
392f42735d
commit
9317872a0e
|
|
@ -392,7 +392,8 @@ static ssize_t set_cpu_max_freq(struct kobject *kobj,
|
|||
if (cpu_possible(cpu)) {
|
||||
i_cpu_stats = &per_cpu(msm_perf_cpu_stats, cpu);
|
||||
|
||||
i_cpu_stats->max = val;
|
||||
i_cpu_stats->max = min_t(uint, val,
|
||||
(unsigned int)FREQ_QOS_MAX_DEFAULT_VALUE);
|
||||
cpumask_set_cpu(cpu, limit_mask_max);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user