aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Alho <[email protected]>2023-09-12 14:29:50 +0300
committerStephen Boyd <[email protected]>2023-09-12 10:56:05 -0700
commita47b44fbb13f5e7a981b4515dcddc93a321ae89c (patch)
tree66df63cb0e64615c2339ea1d3990c7bfec008a28
parent83df5bf010eb5ccc11ce95f2d076515ec216c99c (diff)
clk: tegra: fix error return case for recalc_rate
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 <[email protected]> Signed-off-by: Mikko Perttunen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
-rw-r--r--drivers/clk/tegra/clk-bpmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c
index a9f3fb448de6..7bfba0afd778 100644
--- a/drivers/clk/tegra/clk-bpmp.c
+++ b/drivers/clk/tegra/clk-bpmp.c
@@ -159,7 +159,7 @@ static unsigned long tegra_bpmp_clk_recalc_rate(struct clk_hw *hw,
err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
if (err < 0)
- return err;
+ return 0;
return response.rate;
}