console: console_get_by_name: do not strcmp NULL
console_get_by_name iterates through the console_list using strcmp to mach
a given console by name. console_list may contain entries with devname = NULL,
inserted there e.g. by KEYBOARD_GPIO. In worst case loady -t usbserial
will crash barebox when strcmp hits 0 NULL devname:
> unable to handle NULL pointer dereference at address 0x00000000

Let console_get_by_name just ignore the anonymous consoles.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 444ee36 commit e6419c64cfcb6001e8ded6fa4ce05aebc9c52eac
@Alexander Kurz Alexander Kurz authored on 26 Mar 2017
Sascha Hauer committed on 29 Mar 2017
Showing 1 changed file
View
common/console_common.c