auxdisplay: panel: Make use of hd44780_common_free()

Use the symmetrical API to free the common resources.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
Andy Shevchenko
2025-02-24 19:27:42 +02:00
parent 33152d3660
commit 664d2179c6

View File

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