leds-gpio: fix possible crash on OF device unbinding
If there are leds present in the OF tree, but the GPIOs for (some) of them are unavailable, led_data doesn't get populated with correct devices. Then, on device unbinding, one can crash the kernel. Workaround this by setting led->gpio to invalid value early. Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: NRichard Purdie <rpurdie@linux.intel.com>
Showing
想要评论请 注册 或 登录