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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:46:37 +0000 (14:46 +0100)
commitd4fa8aa0ef869c05559653c23359c68c5bb921b7
treec46fd19256dae454df2399febab2248686177074
parent0ba089779082da6e53b4a57d478091a94e94abb4
cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency

[ 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>
drivers/cpufreq/brcmstb-avs-cpufreq.c