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

From: Haoxiang Li
Date: Mon Feb 24 2025 - 05:08:41 EST


Fix this by using charlcd_free() instead of kfree().

Fixes: 718e05ed92ec ("auxdisplay: Introduce hd44780_common.[ch]")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Haoxiang Li <haoxiang_li2024@xxxxxxx>
---
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..fcd3780ce5d1 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -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[] = {
--
2.25.1