Re: [PATCH] auxdisplay: hd44780: Fix an API misuse in hd44780_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Haoxiang,

On Mon, 24 Feb 2025 at 10:39, Haoxiang Li <haoxiang_li2024@xxxxxxx> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Haoxiang Li <haoxiang_li2024@xxxxxxx>

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@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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux