All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c
@ 2025-02-24 12:36 Andy Shevchenko
  2025-02-24 13:39 ` Geert Uytterhoeven
  2025-02-24 13:40 ` Andy Shevchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-02-24 12:36 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel
  Cc: Willy Tarreau, Ksenija Stanojevic, Andy Shevchenko,
	Geert Uytterhoeven

Variable allocated by charlcd_alloc() should be released
by charlcd_free(). The following patch changed kfree() to
charlcd_free() to fix an API misuse.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/auxdisplay/panel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 098d490c1cf9..4da142692d55 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -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;
 	}
 
-- 
2.45.1.3035.g276e886db78b


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c
  2025-02-24 12:36 [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c Andy Shevchenko
@ 2025-02-24 13:39 ` Geert Uytterhoeven
  2025-02-24 13:46   ` Andy Shevchenko
  2025-02-24 13:40 ` Andy Shevchenko
  1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-02-24 13:39 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Willy Tarreau, Ksenija Stanojevic, Andy Shevchenko

On Mon, 24 Feb 2025 at 13:36, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Variable allocated by charlcd_alloc() should be released
> by charlcd_free(). The following patch changed kfree() to
> charlcd_free() to fix an API misuse.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c
  2025-02-24 12:36 [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c Andy Shevchenko
  2025-02-24 13:39 ` Geert Uytterhoeven
@ 2025-02-24 13:40 ` Andy Shevchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-02-24 13:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: Willy Tarreau, Ksenija Stanojevic, Geert Uytterhoeven

On Mon, Feb 24, 2025 at 02:36:25PM +0200, Andy Shevchenko wrote:
> Variable allocated by charlcd_alloc() should be released
> by charlcd_free(). The following patch changed kfree() to
> charlcd_free() to fix an API misuse.

As discussed with Geert in another similar change this would also need
Fixes: 718e05ed92ec ("auxdisplay: Introduce hd44780_common.[ch]")

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c
  2025-02-24 13:39 ` Geert Uytterhoeven
@ 2025-02-24 13:46   ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-02-24 13:46 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-kernel, Willy Tarreau, Ksenija Stanojevic

On Mon, Feb 24, 2025 at 02:39:48PM +0100, Geert Uytterhoeven wrote:
> On Mon, 24 Feb 2025 at 13:36, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > Variable allocated by charlcd_alloc() should be released
> > by charlcd_free(). The following patch changed kfree() to
> > charlcd_free() to fix an API misuse.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Pushed to my review and testing queue, thanks!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-24 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 12:36 [PATCH v1 1/1] auxdisplay: panel: Fix an API misuse in panel.c Andy Shevchenko
2025-02-24 13:39 ` Geert Uytterhoeven
2025-02-24 13:46   ` Andy Shevchenko
2025-02-24 13:40 ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.