From: Daniel Thompson <hidden> Date: 2024-02-20 15:30:17
Luca Weiss recently shared a patch to zero the properties structure for
lm3630a... and shortly afterwards I realized I should probably scan for
a similar class of errors in other drivers.
Results follow in the next four patches (they could all be one patch but
for the fact there are different Fixes: tags)!
Daniel Thompson (4):
backlight: da9052: Fully initialize backlight_properties during probe
backlight: lm3639: Fully initialize backlight_properties during probe
backlight: lp8788: Fully initialize backlight_properties during probe
backlight: mp3309c: Fully initialize backlight_properties during probe
drivers/video/backlight/da9052_bl.c | 1 +
drivers/video/backlight/lm3639_bl.c | 1 +
drivers/video/backlight/lp8788_bl.c | 1 +
drivers/video/backlight/mp3309c.c | 1 +
4 files changed, 4 insertions(+)
base-commit: b401b621758e46812da61fa58a67c3fd8d91de0d
--
2.43.0
From: Daniel Thompson <hidden> Date: 2024-02-20 15:30:18
props is stack allocated and the fields that are not explcitly set
by the probe function need to be zeroed or we'll get undefined behaviour
(especially so power/blank states)!
Fixes: 6ede3d832aaa ("backlight: add driver for DA9052/53 PMIC v1")
Signed-off-by: Daniel Thompson <redacted>
---
drivers/video/backlight/da9052_bl.c | 1 +
1 file changed, 1 insertion(+)
From: Daniel Thompson <hidden> Date: 2024-02-20 15:30:20
props is stack allocated and the fields that are not explcitly set
by the probe function need to be zeroed or we'll get undefined behaviour
(especially so power/blank states)!
Fixes: 0f59858d5119 ("backlight: add new lm3639 backlight driver")
Signed-off-by: Daniel Thompson <redacted>
---
drivers/video/backlight/lm3639_bl.c | 1 +
1 file changed, 1 insertion(+)
From: Daniel Thompson <hidden> Date: 2024-02-20 15:30:22
props is stack allocated and the fields that are not explcitly set
by the probe function need to be zeroed or we'll get undefined behaviour
(especially so power/blank states)!
Fixes: c5a51053cf3b ("backlight: add new lp8788 backlight driver")
Signed-off-by: Daniel Thompson <redacted>
---
drivers/video/backlight/lp8788_bl.c | 1 +
1 file changed, 1 insertion(+)
From: Daniel Thompson <hidden> Date: 2024-02-20 15:30:23
props is stack allocated and, although this driver initializes all the
fields that are not "owned" by the framework, we'd still like to ensure
it is zeroed to avoid problems from this driver if the fields change.
Signed-off-by: Daniel Thompson <redacted>
---
drivers/video/backlight/mp3309c.c | 1 +
1 file changed, 1 insertion(+)