driver-core: platform: Catch errors from calls to irq_get_irq_data
authorGuenter Roeck <linux@roeck-us.net>
Wed, 14 Sep 2016 03:32:44 +0000 (20:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 10:30:37 +0000 (12:30 +0200)
commit60ca5e0d280b1a51df55c5fc2e5bfe010b344c5a
tree3389804982b1d415687846bb67308b646cf5320b
parent78618d395b65fadb2937a985308c3a4d2897ade2
driver-core: platform: Catch errors from calls to irq_get_irq_data

irq_get_irq_data() can return NULL, which results in a nasty crash.
Check its return value before passing it on to irqd_set_trigger_type().

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c