[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdVufJ3CopGfCXzqfsX14AKWoAn_eUMY4GP1o+mznugKUQ@mail.gmail.com>
Date: Mon, 24 Feb 2025 10:56:57 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Haoxiang Li <haoxiang_li2024@....com>
Cc: andy@...nel.org, u.kleine-koenig@...gutronix.de, erick.archer@...look.com,
ojeda@...nel.org, w@....eu, poeschel@...onage.de,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] auxdisplay: hd44780: Fix an API misuse in hd44780_probe()
Hi Haoxiang,
On Mon, 24 Feb 2025 at 10:39, Haoxiang Li <haoxiang_li2024@....com> wrote:
> Variable "lcd" allocated by charlcd_alloc() should be
> released by charlcd_free(). The following patch changed
> kfree(lcd) to charlcd_free(lcd) to fix an API misuse.
>
> Fixes: 718e05ed92ec ("auxdisplay: Introduce hd44780_common.[ch]")
> Cc: stable@...r.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024@....com>
Thanks for your patch!
> --- a/drivers/auxdisplay/hd44780.c
> +++ b/drivers/auxdisplay/hd44780.c
> @@ -313,7 +313,7 @@ static int hd44780_probe(struct platform_device *pdev)
> fail3:
> kfree(hd);
> fail2:
> - kfree(lcd);
> + charlcd_free(lcd);
> fail1:
> kfree(hdc);
> return ret;
LGTM, but please make a similar change to hd44780_remove().
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
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
Powered by blists - more mailing lists