]> git.baikalelectronics.ru Git - kernel.git/commit
clk: tegra: fix error return case for recalc_rate
authorTimo Alho <talho@nvidia.com>
Tue, 12 Sep 2023 11:29:50 +0000 (14:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:47 +0000 (14:56 +0200)
commitea4efaf54685d66c25b9bab7b1462361e991e6c3
tree86411f6468db1aef3083ecf8e45cbb0e38046dba
parentefad31b6c062f61b7a61c8b1a200d0a74087a35a
clk: tegra: fix error return case for recalc_rate

[ Upstream commit a47b44fbb13f5e7a981b4515dcddc93a321ae89c ]

tegra-bpmp clocks driver makes implicit conversion of signed error
code to unsigned value in recalc_rate operation. The behavior for
recalc_rate, according to it's specification, should be that "If the
driver cannot figure out a rate for this clock, it must return 0."

Fixes: ca6f2796eef7 ("clk: tegra: Add BPMP clock driver")
Signed-off-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Link: https://lore.kernel.org/r/20230912112951.2330497-1-cyndis@kapsi.fi
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/tegra/clk-bpmp.c