From: Andy Shevchenko Date: Mon, 24 Feb 2025 17:27:42 +0000 (+0200) Subject: auxdisplay: panel: Make use of hd44780_common_free() X-Git-Tag: v6.15-rc1~175^2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=664d2179c6e3d08d5e1180beddd79ca8f0663d89;p=thirdparty%2Fkernel%2Flinux.git auxdisplay: panel: Make use of hd44780_common_free() Use the symmetrical API to free the common resources. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven --- diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index 4da142692d55f..aa1d03fef22e9 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; }