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

From: Andy Shevchenko

Date: Wed Aug 12 2026 - 04:42:48 EST


On Sun, Jul 19, 2026 at 05:53:31PM +0200, Miguel Ojeda wrote:
> On Sun, Jul 19, 2026 at 4:43 PM 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.
> >
> > Cancel the delayed work and turn the backlight off before returning the
> > registration error.
> >
> > Signed-off-by: Hongyan Xu <getshell@xxxxxxxxxx>
>
> I think you may have used an out-of-date `MAINTAINERS` file...
>
> Cc'ing auxdisplay as well as Lars and Willy who were involved in the
> past with `charlcd`.

Geert, are you okay with the change?
I have browsed the code and the report seems valid.

Hongyan, the patch adds the same piece that's already present in the
charlcd_unregister(). Can you split that to the helper function like
charlcd_bl_cancel_work()?

Also this needs a Fixes tag.

--
With Best Regards,
Andy Shevchenko