Patch "backlight: mp3309c: Fix signedness bug in mp3309c_parse_fwnode()" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    backlight: mp3309c: Fix signedness bug in mp3309c_parse_fwnode()

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     backlight-mp3309c-fix-signedness-bug-in-mp3309c_pars.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8a755d75c91611a5a873bb7bc40164946a5c5024
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Sat Mar 16 12:45:27 2024 +0300

    backlight: mp3309c: Fix signedness bug in mp3309c_parse_fwnode()
    
    [ Upstream commit e962f13b1e86272a5dcdaede2dfb649152e981e9 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
    Tested-by: Flavio Suligoi <f.suligoi@xxxxxxx>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/74347f67-360d-4513-8939-595e3c4764fa@moroto.mountain
    Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
index c80a1481e742b..4e98e60417d23 100644
--- a/drivers/video/backlight/mp3309c.c
+++ b/drivers/video/backlight/mp3309c.c
@@ -205,8 +205,9 @@ static int mp3309c_parse_fwnode(struct mp3309c_chip *chip,
 				struct mp3309c_platform_data *pdata)
 {
 	int ret, i;
-	unsigned int num_levels, tmp_value;
+	unsigned int tmp_value;
 	struct device *dev = chip->dev;
+	int num_levels;
 
 	if (!dev_fwnode(dev))
 		return dev_err_probe(dev, -ENODEV, "failed to get firmware node\n");




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux