auxdisplay: panel: Fix an API misuse in panel.c
Subsystems (2)
PATCH 1/1 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.
--- drivers/auxdisplay/panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/auxdisplay/panel.c +2 -2
@@ -1664,7 +1664,7 @@ static void panel_attach(struct parport *port)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 ; }
Signature · 1 line
2.45.1.3035.g276e886db78b
Quoted 5 lines · Andy Shevchenko
Variable allocated by
charlcd_alloc()should be released bycharlcd_free(). The following patch changedkfree()tocharlcd_free()to fix an API misuse.Signed-off-by Andy Shevchenko <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 9 lines · Geert Uytterhoeven
Quoted 5 lines · Andy Shevchenko
Variable allocated by
charlcd_alloc()should be released bycharlcd_free(). The following patch changedkfree()tocharlcd_free()to fix an API misuse.Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 3 lines · Andy Shevchenko
Variable allocated by
charlcd_alloc()should be released bycharlcd_free(). The following patch changedkfree()tocharlcd_free()to fix an API misuse.
As discussed with Geert in another similar change this would also need
Signature · 2 lines
With Best Regards, Andy Shevchenko