[PATCH] clk: renesas: Do not test unsigned variable to be less than 0

Marek Vasut marek.vasut at mailbox.org
Thu Jul 24 18:34:31 CEST 2025


On 7/24/25 12:48 PM, Andrew Goodbody wrote:
> In rcar_clk_set_rate64_div_table the unsigned variable 'value' is used
> to receive the return value from rcar_clk_get_table_val which returns an
> int and then attempts to test for being less than 0, which can never be
> true. Instead declare value as an int so the code can behave as
> expected. Also remove initial values from 'value' and 'div' as they are
> not needed.
> 
> This issue was found by Smatch.
> 
> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

Thanks !


More information about the U-Boot mailing list