]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
auxdisplay: panel: Make use of hd44780_common_free()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 24 Feb 2025 17:27:42 +0000 (19:27 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 Mar 2025 16:03:02 +0000 (18:03 +0200)
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>
drivers/auxdisplay/panel.c

index 4da142692d55f8ab5dbd04e11a1e13e32803003d..aa1d03fef22e9725672dbbaa3b545e1fe142aa74 100644 (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;
        }