[PATCH v1 5/7] auxdisplay: panel: Make use of hd44780_common_free()

From: Andy Shevchenko
Date: Mon Feb 24 2025 - 12:33:59 EST


Use the symmetrical API to free the common resources.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/auxdisplay/panel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 4da142692d55..aa1d03fef22e 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -837,7 +837,7 @@ static void lcd_init(void)

charlcd = charlcd_alloc(0);
if (!charlcd) {
- kfree(hdc);
+ hd44780_common_free(hdc);
return;
}

@@ -1691,7 +1691,7 @@ static void panel_detach(struct parport *port)
if (lcd.enabled) {
charlcd_unregister(lcd.charlcd);
lcd.initialized = false;
- kfree(lcd.charlcd->drvdata);
+ hd44780_common_free(lcd.charlcd->drvdata);
charlcd_free(lcd.charlcd);
lcd.charlcd = NULL;
}
--
2.45.1.3035.g276e886db78b