Commit 9b11d639 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Miguel Ojeda

auxdisplay: panel: Convert to use charlcd_free()

Convert to use charlcd_free() instead of kfree() for sake of type check.
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent 8e44fc85
...@@ -1620,7 +1620,7 @@ static void panel_attach(struct parport *port) ...@@ -1620,7 +1620,7 @@ static void panel_attach(struct parport *port)
if (lcd.enabled) if (lcd.enabled)
charlcd_unregister(lcd.charlcd); charlcd_unregister(lcd.charlcd);
err_unreg_device: err_unreg_device:
kfree(lcd.charlcd); charlcd_free(lcd.charlcd);
lcd.charlcd = NULL; lcd.charlcd = NULL;
parport_unregister_device(pprt); parport_unregister_device(pprt);
pprt = NULL; pprt = NULL;
...@@ -1647,7 +1647,7 @@ static void panel_detach(struct parport *port) ...@@ -1647,7 +1647,7 @@ static void panel_detach(struct parport *port)
if (lcd.enabled) { if (lcd.enabled) {
charlcd_unregister(lcd.charlcd); charlcd_unregister(lcd.charlcd);
lcd.initialized = false; lcd.initialized = false;
kfree(lcd.charlcd); charlcd_free(lcd.charlcd);
lcd.charlcd = NULL; lcd.charlcd = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment