[PATCH] backlight: mp3309c: fix signedness bug in mp3309c_parse_fwnode()

Daniel Thompson daniel.thompson at linaro.org
Mon Mar 18 10:57:11 UTC 2024


On Sat, Mar 16, 2024 at 12:45:27PM +0300, Dan Carpenter wrote:
> The "num_levels" variable is used to store error codes from
> device_property_count_u32() so it needs to be signed.  This doesn't
> cause an issue at runtime because devm_kcalloc() won't allocate negative
> sizes.  However, it's still worth fixing.
>
> Fixes: b54c828bdba9 ("backlight: mp3309c: Make use of device properties")
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>

Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>


Daniel.


More information about the dri-devel mailing list