[GITLAB] - UPGRADE TO v12 on Wednesday the 18th of December at 11.30AM

  • Russell King's avatar
    leds: leds-pwm: properly clean up after probe failure · 5d33fff5
    Russell King authored
    commit 392369019eb96e914234ea21eda806cb51a1073e upstream.
    
    When probing with DT, we add each LED one at a time.  If we find a LED
    without a PWM device (because it is not available yet) we fail the
    initialisation, unregister previous LEDs, and then by way of managed
    resources, we free the structure.
    
    The problem with this is we may have a scheduled and active work_struct
    in this structure, and this results in a nasty kernel oops.
    
    We need to cancel this work_struct properly upon cleanup - and the
    cleanup we require is the same cleanup as we do when the LED platform
    device is removed.  Rather than writing this same code three times,
    move it into a separate function and use it in all three places.
    
    Fixes: c971ff18 ("leds: leds-pwm: Defer led_pwm_set() if PWM can sleep")
    Signed-off-by: 's avatarRussell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: 's avatarBryan Wu <cooloney@gmail.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    5d33fff5
Name
Last commit
Last update
..
trigger Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
dell-led.c Loading commit data...
led-class.c Loading commit data...
led-core.c Loading commit data...
led-triggers.c Loading commit data...
leds-88pm860x.c Loading commit data...
leds-adp5520.c Loading commit data...
leds-asic3.c Loading commit data...
leds-atmel-pwm.c Loading commit data...
leds-bd2802.c Loading commit data...
leds-blinkm.c Loading commit data...
leds-clevo-mail.c Loading commit data...
leds-cobalt-qube.c Loading commit data...
leds-cobalt-raq.c Loading commit data...
leds-da903x.c Loading commit data...
leds-da9052.c Loading commit data...
leds-dac124s085.c Loading commit data...
leds-fsg.c Loading commit data...
leds-gpio-register.c Loading commit data...
leds-gpio.c Loading commit data...
leds-hp6xx.c Loading commit data...
leds-lm3530.c Loading commit data...
leds-lm3533.c Loading commit data...
leds-lm355x.c Loading commit data...
leds-lm3642.c Loading commit data...
leds-locomo.c Loading commit data...
leds-lp3944.c Loading commit data...
leds-lp5521.c Loading commit data...
leds-lp5523.c Loading commit data...
leds-lp5562.c Loading commit data...
leds-lp55xx-common.c Loading commit data...
leds-lp55xx-common.h Loading commit data...
leds-lp8788.c Loading commit data...
leds-lt3593.c Loading commit data...
leds-max8997.c Loading commit data...
leds-mc13783.c Loading commit data...
leds-net48xx.c Loading commit data...
leds-netxbig.c Loading commit data...
leds-ns2.c Loading commit data...
leds-ot200.c Loading commit data...
leds-pca9532.c Loading commit data...
leds-pca955x.c Loading commit data...
leds-pca9633.c Loading commit data...
leds-pwm.c Loading commit data...
leds-rb532.c Loading commit data...
leds-regulator.c Loading commit data...
leds-renesas-tpu.c Loading commit data...
leds-s3c24xx.c Loading commit data...
leds-ss4200.c Loading commit data...
leds-sunfire.c Loading commit data...
leds-tca6507.c Loading commit data...
leds-wm831x-status.c Loading commit data...
leds-wm8350.c Loading commit data...
leds-wrap.c Loading commit data...
leds.h Loading commit data...