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: 19a2668a ("ARM: OMAP1: ams-delta: Provide GPIO lookup table for LED device") Signed-off-by: NAaro Koskinen <aaro.koskinen@iki.fi> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NTony Lindgren <tony@atomide.com>
Showing
想要评论请 注册 或 登录