summaryrefslogtreecommitdiff
path: root/drivers/interconnect/qcom/msm8996.c
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-12-06 14:45:42 +0300
committerGeorgi Djakov <djakov@kernel.org>2021-12-06 20:52:19 +0300
commita7d9436a6c85fcb8843c910fd323dcd7f839bf63 (patch)
tree331e678bc7e0c21862b565dcd3ed08541a352217 /drivers/interconnect/qcom/msm8996.c
parent42cdeb69d95e8b320adcb0ceff57d1dd9b0ba19f (diff)
downloadlinux-a7d9436a6c85fcb8843c910fd323dcd7f839bf63.tar.xz
interconnect: qcom: rpm: Prevent integer overflow in rate
Using icc-rpm on ARM32 currently results in clk_set_rate() errors during boot, e.g. "bus clk_set_rate error: -22". This is very similar to commit 7381e27b1e56 ("interconnect: qcom: msm8974: Prevent integer overflow in rate") where the u64 is converted to a signed long during clock rate rounding, resulting in an overflow on 32-bit platforms. Let's fix it similarly by making sure that the rate does not exceed LONG_MAX. Such high clock rates will surely result in the maximum frequency of the bus anyway. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20211206114542.45325-1-stephan@gerhold.net Signed-off-by: Georgi Djakov <djakov@kernel.org>
Diffstat (limited to 'drivers/interconnect/qcom/msm8996.c')
0 files changed, 0 insertions, 0 deletions