Commit fab976ac authored by Jagadeesh Kona's avatar Jagadeesh Kona Committed by Matthias Männich
Browse files

FROMGIT: 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.

Bug: 341232503
Link: https://lore.kernel.org/all/20240520063732.11220-1-quic_jkona@quicinc.com/
(cherry picked from commit 074cffb5 https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git

 cpufreq/arm/linux-next)
Change-Id: I7e20922f23b75f78956961b1dfa5ee485524f160
Signed-off-by: default avatarJagadeesh Kona <quic_jkona@quicinc.com>
parent f24b9398
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment