Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: viafb: check ioremap return value in viafb_lcd_get_mobile_state

The function viafb_lcd_get_mobile_state() calls ioremap() without
checking the return value. If ioremap() fails (returns NULL), the
subsequent readw() will cause a NULL pointer dereference.

Signed-off-by: Wang Jun <1742789905@qq.com>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Wang Jun and committed by
Helge Deller
f0447880 db65872b

+3
+3
drivers/video/fbdev/via/lcd.c
··· 954 954 u16 start_pattern; 955 955 956 956 biosptr = ioremap(romaddr, 0x10000); 957 + if (!biosptr) 958 + return false; 959 + 957 960 start_pattern = readw(biosptr); 958 961 959 962 /* Compare pattern */