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:Jagadeesh Kona <quic_jkona@quicinc.com>
Loading
Please sign in to comment