Searched hist:"86 c68e2fb3eeb87ef716a0d61c5a346e9aee2ecb" (Results 1 – 2 of 2) sorted by relevance
/linux/drivers/video/backlight/ |
H A D | adp8870_bl.c | diff 86c68e2fb3eeb87ef716a0d61c5a346e9aee2ecb Mon Nov 23 14:44:13 CET 2015 Arnd Bergmann <arnd@arndb.de> backlight: adp88x0: Fix uninitialized variable use
gcc correctly warns about both the adp8860 and adp8870 backlight drivers using an uninitialized variable in their error handling path:
drivers/video/backlight/adp8870_bl.c: In function 'adp8870_bl_ambient_light_zone_store': drivers/video/backlight/adp8870_bl.c:811:11: warning: 'reg_val' may be used uninitialized in this function
This changes the code to only write back the data if it was correctly read to start with.
As a side-note, the drivers are mostly identical, so I think they should really be merged into one file to avoid having to fix every bug twice.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
H A D | adp8860_bl.c | diff 86c68e2fb3eeb87ef716a0d61c5a346e9aee2ecb Mon Nov 23 14:44:13 CET 2015 Arnd Bergmann <arnd@arndb.de> backlight: adp88x0: Fix uninitialized variable use
gcc correctly warns about both the adp8860 and adp8870 backlight drivers using an uninitialized variable in their error handling path:
drivers/video/backlight/adp8870_bl.c: In function 'adp8870_bl_ambient_light_zone_store': drivers/video/backlight/adp8870_bl.c:811:11: warning: 'reg_val' may be used uninitialized in this function
This changes the code to only write back the data if it was correctly read to start with.
As a side-note, the drivers are mostly identical, so I think they should really be merged into one file to avoid having to fix every bug twice.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
|