Skip to content
Commit 0b4634fc authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Richard Purdie
Browse files

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: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent 716bdf18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment