OpenCloudOS-Kernel/drivers/auxdisplay
Arnd Bergmann e1f990c24d auxdisplay: ht16k33: don't access uninitialized data
gcc-7.0.1 points out that we copy uninitialized data from the stack
into a per-device structure:

drivers/auxdisplay/ht16k33.c: In function 'ht16k33_keypad_irq_thread':
arch/x86/include/asm/string_32.h:78:16: error: 'new_state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
arch/x86/include/asm/string_32.h:79:22: error: '*((void *)&new_state+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The access is harmless because we never read the data, but we are better
off not doing this, so this changes the code to only copy the data
that was actually initialized. To make sure we don't overflow the
stack with an incorrect DT, we also need to add a sanity checkin the
probe function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Robin van der Gracht <robin@protonic.nl>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:48:19 +02:00
..
Kconfig auxdisplay: Add HD44780 Character LCD support 2017-03-17 15:10:50 +09:00
Makefile auxdisplay: Add HD44780 Character LCD support 2017-03-17 15:10:50 +09:00
cfag12864b.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cfag12864bfb.c framebuffer: Use fb_<level> 2013-10-29 12:53:07 +02:00
charlcd.c auxdisplay: charlcd: Add support for displays with more than two lines 2017-03-17 15:10:49 +09:00
hd44780.c auxdisplay: hd44780: Fix DT properties to include units of measurement 2017-04-08 17:48:19 +02:00
ht16k33.c auxdisplay: ht16k33: don't access uninitialized data 2017-04-08 17:48:19 +02:00
img-ascii-lcd.c auxdisplay: img-ascii-lcd: add missing sentinel entry in img_ascii_lcd_matches 2017-03-16 16:59:55 +09:00
ks0108.c auxdisplay: ks0108: initialize local parport variable 2015-08-14 17:27:17 -07:00