mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
auxdisplay: panel: Fix an API misuse in panel.c
Variable allocated by charlcd_alloc() should be released
by charlcd_free(). The following patch changed kfree() to
charlcd_free() to fix an API misuse.
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 718e05ed92 ("auxdisplay: Introduce hd44780_common.[ch]")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
9b98a7d2e5
commit
72e1c440c8
1 changed files with 2 additions and 2 deletions
|
|
@ -1664,7 +1664,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;
|
||||
|
|
@ -1692,7 +1692,7 @@ static void panel_detach(struct parport *port)
|
|||
charlcd_unregister(lcd.charlcd);
|
||||
lcd.initialized = false;
|
||||
kfree(lcd.charlcd->drvdata);
|
||||
kfree(lcd.charlcd);
|
||||
charlcd_free(lcd.charlcd);
|
||||
lcd.charlcd = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue