[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250224093810.2965667-1-haoxiang_li2024@163.com>
Date: Mon, 24 Feb 2025 17:38:10 +0800
From: Haoxiang Li <haoxiang_li2024@....com>
To: andy@...nel.org,
geert@...ux-m68k.org,
haoxiang_li2024@....com,
u.kleine-koenig@...gutronix.de,
erick.archer@...look.com,
ojeda@...nel.org,
w@....eu,
poeschel@...onage.de
Cc: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: [PATCH] auxdisplay: hd44780: Fix an API misuse in hd44780_probe()
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>
---
drivers/auxdisplay/hd44780.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 0526f0d90a79..a1729196bc82 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;
--
2.25.1
Powered by blists - more mailing lists