Skip to content
Commit e962f13b authored by Dan Carpenter's avatar Dan Carpenter Committed by Lee Jones
Browse files

backlight: mp3309c: Fix signedness bug in mp3309c_parse_fwnode()



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: b54c828b ("backlight: mp3309c: Make use of device properties")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Tested-by: default avatarFlavio Suligoi <f.suligoi@asem.it>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/74347f67-360d-4513-8939-595e3c4764fa@moroto.mountain


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 13cb61be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment