linux-xiaomi-chiron/drivers/auxdisplay
Luiz Sampaio 4daa9ff89e auxdisplay: charlcd: checking for pointer reference before dereferencing
Check if the pointer lcd->ops->init_display exists before dereferencing it.
If a driver called charlcd_init() without defining the ops, this would
return segmentation fault, as happened to me when implementing a charlcd
driver.  Checking the pointer before dereferencing protects from
segmentation fault.

Signed-off-by: Luiz Sampaio <sampaio.ime@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-11-24 11:46:52 +01:00
..
arm-charlcd.c
cfag12864b.c
cfag12864bfb.c
charlcd.c
charlcd.h
hd44780.c
hd44780_common.c
hd44780_common.h
ht16k33.c
img-ascii-lcd.c
Kconfig
ks0108.c
lcd2s.c
line-display.c
line-display.h
Makefile
panel.c