Re: [PATCH v3] auxdisplay: charlcd: cancel backlight work on registration failure
From: Geert Uytterhoeven
Date: Sat Aug 15 2026 - 09:39:22 EST
On Sat, 15 Aug 2026 at 13:00, Hongyan Xu <getshell@xxxxxxxxxx> wrote:
> With CONFIG_CHARLCD_BL_FLASH, charlcd_init() schedules bl_work before
> charlcd_register() calls misc_register(). If registration fails, the
> caller frees the charlcd object while delayed work still contains its
> address.
>
> Add charlcd_deinit() to cancel the delayed work and turn the backlight
> off. Use it for both registration rollback and normal unregistration.
>
> Fixes: 39f8ea46724e ("auxdisplay: charlcd: Extract character LCD core from misc/panel")
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Hongyan Xu <getshell@xxxxxxxxxx>
> ---
> Changes in v3:
> - Add Cc: stable@xxxxxxxxxxxxxxx (Miguel).
>
> Changes in v2:
> - Factor the backlight cleanup into charlcd_deinit() and reuse it from
> charlcd_unregister() (Andy, Geert).
> - Add the Fixes tag (Andy).
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds