]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: OMAP1: ams-delta: fix early boot crash when LED support is disabled
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 15 Apr 2019 23:37:32 +0000 (02:37 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 16 Apr 2019 14:43:19 +0000 (07:43 -0700)
commitb7380ed9ea9823a6a47d150a6db43aaba7194869
treef6dbeac04014102cb313622e8a25bad13f242525
parent6bc187e2eac893d372026697f80047d565ed6899
ARM: OMAP1: ams-delta: fix early boot crash when LED support is disabled

When we boot with the LED support (CONFIG_NEW_LEDS) disabled,
gpio_led_register_device() will return a NULL pointer and we try
to dereference it. Fix by checking also for a NULL pointer.

Fixes: 38dbbb1c070c ("ARM: OMAP1: ams-delta: Provide GPIO lookup table for LED device")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-ams-delta.c