Skip to content
Commit ea37096a authored by Jagadeesh Kona's avatar Jagadeesh Kona Committed by Greg Kroah-Hartman
Browse files

cpufreq: scmi: Avoid overflow of target_freq in fast switch



[ Upstream commit 074cffb5020ddcaa5fafcc55655e5da6ebe8c831 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0bd1be7e
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