Skip to content

Commit a47b44f

Browse files
ta72bebarino
authored andcommitted
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: ca6f279 ("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]>
1 parent 83df5bf commit a47b44f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/tegra/clk-bpmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static unsigned long tegra_bpmp_clk_recalc_rate(struct clk_hw *hw,
159159

160160
err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
161161
if (err < 0)
162-
return err;
162+
return 0;
163163

164164
return response.rate;
165165
}

0 commit comments

Comments
 (0)