diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2015-04-14 14:23:30 -0700 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2015-05-04 11:05:54 -0700 |
commit | 65c6b7e3ab70effc150dacc9c2fbd6581925dd53 (patch) | |
tree | e2babc061bd43fe446f8734024c57134a2511ac0 /drivers/leds/leds-lm3533.c | |
parent | e370d010a5fe385ae65635ce0dbb1eff0e25059c (diff) |
leds: gpio: Fix device teardown on probe deferral
In gpio_leds_create(), when devm_get_gpiod_from_child() fails with
-EPROBE_DEFER on the second gpio led to be created, the first already
registered led is not torn down properly. This causes create_gpio_led()
to fail for the first led on re-probe().
Fix this misbehaviour by incrementing num_leds only if all
potentially failing calls completed successfully.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lm3533.c')
0 files changed, 0 insertions, 0 deletions