Skip to content

Commit 790437b

Browse files
Dan Carpenterbebarino
authored andcommitted
clk: stm32: Fix a signedness issue in clk_stm32_composite_determine_rate()
The divider_ro_round_rate() function could potentially return -EINVAL on error but the error handling doesn't work because "rate" is unsigned. It should be a type long. Fixes: 06ed0fc ("clk: stm32: composite: Switch to determine_rate") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent ceb87a3 commit 790437b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/stm32/clk-stm32-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static int clk_stm32_composite_determine_rate(struct clk_hw *hw,
431431
{
432432
struct clk_stm32_composite *composite = to_clk_stm32_composite(hw);
433433
const struct stm32_div_cfg *divider;
434-
unsigned long rate;
434+
long rate;
435435

436436
if (composite->div_id == NO_STM32_DIV)
437437
return 0;

0 commit comments

Comments
 (0)