Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 06ed0fc0fbac ("clk: stm32: composite: Switch to determine_rate")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/d9a78453-9b40-48c1-830e-00751ba3ecb8@kili.mountain
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Dan Carpenter and committed by
Stephen Boyd
790437bb ceb87a36

+1 -1
+1 -1
drivers/clk/stm32/clk-stm32-core.c
··· 431 431 { 432 432 struct clk_stm32_composite *composite = to_clk_stm32_composite(hw); 433 433 const struct stm32_div_cfg *divider; 434 - unsigned long rate; 434 + long rate; 435 435 436 436 if (composite->div_id == NO_STM32_DIV) 437 437 return 0;