Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41914045 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: msm_lmh_dcvs: Fix unsigned integer overflow error



The frequency value that is calculated in Hz can be of a large value to
cause unsigned integer overflow. DCVSh though fetches the final
frequency value in HZ in a unsigned long variable, the intermediate
variable used in the estimation is unsigned integer. This will result in
a wrong frequency value being reported to userspace and clients.

Fix the overflow by using a unsigned long datatype for the frequency
computation.

Change-Id: I4bba53b9f5bd243c4aaaf67a831ce77ef231b38f
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent ad64f315
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment