Skip to content
Commit 074cffb5 authored by Jagadeesh Kona's avatar Jagadeesh Kona Committed by Viresh Kumar
Browse files

cpufreq: scmi: Avoid overflow of target_freq in fast switch



Conversion of target_freq to HZ in scmi_cpufreq_fast_switch()
can lead to overflow if the multiplied result is greater than
UINT_MAX, since type of target_freq is unsigned int. Avoid this
overflow by assigning target_freq to unsigned long variable for
converting it to HZ.

Signed-off-by: default avatarJagadeesh Kona <quic_jkona@quicinc.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent fa8036e5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment