PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out
authorDmitry Osipenko <digetx@gmail.com>
Mon, 4 Nov 2019 21:56:03 +0000 (00:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 18:40:02 +0000 (20:40 +0200)
commit0a06f599c8dc7da61577a1817b9a04b7acb46f5c
tree544ad99b9d7923333e233cb84a7ad10801587edb
parentb11dcb6cf569a0c75466f92da7628b82039fe2fa
PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out

[ Upstream commit 53b4b2aeee26f42cde5ff2a16dd0d8590c51a55a ]

There is another kHz-conversion bug in the code, resulting in integer
overflow. Although, this time the resulting value is 4294966296 and it's
close to ULONG_MAX, which is okay in this case.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/devfreq/tegra-devfreq.c