From: Haoxiang Li Date: Mon, 24 Feb 2025 10:15:27 +0000 (+0800) Subject: auxdisplay: hd44780: Fix an API misuse in hd44780.c X-Git-Tag: v6.15-rc1~175^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b98a7d2e5f4e2beeff88f6571da0cdc5883c7fb;p=thirdparty%2Fkernel%2Flinux.git auxdisplay: hd44780: Fix an API misuse in hd44780.c Variable allocated by charlcd_alloc() should be released by charlcd_free(). The following patch changed kfree() to charlcd_free() to fix an API misuse. Fixes: 718e05ed92ec ("auxdisplay: Introduce hd44780_common.[ch]") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko --- diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c index 0526f0d90a793..9d0ae9c02e9ba 100644 --- 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; @@ -328,7 +328,7 @@ static void hd44780_remove(struct platform_device *pdev) kfree(hdc->hd44780); kfree(lcd->drvdata); - kfree(lcd); + charlcd_free(lcd); } static const struct of_device_id hd44780_of_match[] = {