]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 22 May 2019 18:45:47 +0000 (11:45 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit9858d8989d5b049755c40359145085e0d0abba1b
treede9433fe46f9b8f30ea4804b83a447007dd5131a
parent28267d0ba42ead0943732911d0f02ce6a8d59038
cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 4c5681fcc684c762b09435de3e82ffeee7769d21 ]

What we read back from the register is going to be capped at 32-bits,
and cpufreq_freq_table.frequency is an unsigned int. Avoid any possible
value truncation by using the appropriate return value.

Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/cpufreq/brcmstb-avs-cpufreq.c