auxdisplay: panel: Convert to use charlcd_free()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 12 Mar 2019 14:44:31 +0000 (16:44 +0200)
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Sun, 17 Mar 2019 07:48:22 +0000 (08:48 +0100)
Convert to use charlcd_free() instead of kfree() for sake of type check.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
drivers/auxdisplay/panel.c

index 21b9b2f..e06de63 100644 (file)
@@ -1620,7 +1620,7 @@ err_lcd_unreg:
        if (lcd.enabled)
                charlcd_unregister(lcd.charlcd);
 err_unreg_device:
-       kfree(lcd.charlcd);
+       charlcd_free(lcd.charlcd);
        lcd.charlcd = NULL;
        parport_unregister_device(pprt);
        pprt = NULL;
@@ -1647,7 +1647,7 @@ static void panel_detach(struct parport *port)
        if (lcd.enabled) {
                charlcd_unregister(lcd.charlcd);
                lcd.initialized = false;
-               kfree(lcd.charlcd);
+               charlcd_free(lcd.charlcd);
                lcd.charlcd = NULL;
        }