Re: [PATCH v3] auxdisplay: charlcd: cancel backlight work on registration failure

Geert Uytterhoeven <[email protected]>
Newsgroups org.kernel.vger.stable,org.kernel.vger.linux-kernel
Message-ID <CAMuHMdXNu2U=Qv5ObE3bs-5+wnVo+4EEXD4oRcjqy1wLVrWjsg@mail.gmail.com>
On Sat, 15 Aug 2026 at 13:00, Hongyan Xu <[email protected]> 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: [email protected]
> Reviewed-by: Geert Uytterhoeven <[email protected]>
> Signed-off-by: Hongyan Xu <[email protected]>
> ---
> Changes in v3:
> - Add Cc: [email protected] (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 <[email protected]>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.