[PATCH v1 4/7] auxdisplay: hd44780: Make use of hd44780_common_free()

Andy Shevchenko posted 7 patches 9 months, 3 weeks ago
[PATCH v1 4/7] auxdisplay: hd44780: Make use of hd44780_common_free()
Posted by Andy Shevchenko 9 months, 3 weeks ago
Use the symmetrical API to free the common resources.

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

diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 1d67fe324341..ef38cb7bf13d 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -315,7 +315,7 @@ static int hd44780_probe(struct platform_device *pdev)
 fail2:
 	charlcd_free(lcd);
 fail1:
-	kfree(hdc);
+	hd44780_common_free(hdc);
 	return ret;
 }
 
@@ -326,8 +326,7 @@ static void hd44780_remove(struct platform_device *pdev)
 
 	charlcd_unregister(lcd);
 	kfree(hdc->hd44780);
-	kfree(lcd->drvdata);
-
+	hd44780_common_free(hdc);
 	charlcd_free(lcd);
 }
 
-- 
2.45.1.3035.g276e886db78b
Re: [PATCH v1 4/7] auxdisplay: hd44780: Make use of hd44780_common_free()
Posted by Geert Uytterhoeven 9 months, 2 weeks ago
Hi Andy,

On Mon, 24 Feb 2025 at 18:30, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Use the symmetrical API to free the common resources.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks for your patch!

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

Perhaps fold this into [PATCH v1 3/7]?

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
Re: [PATCH v1 4/7] auxdisplay: hd44780: Make use of hd44780_common_free()
Posted by Andy Shevchenko 9 months, 2 weeks ago
On Fri, Mar 07, 2025 at 10:05:38AM +0100, Geert Uytterhoeven wrote:
> On Mon, 24 Feb 2025 at 18:30, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > Use the symmetrical API to free the common resources.

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

Thanks!

> Perhaps fold this into [PATCH v1 3/7]?

I still think they are logically split.

-- 
With Best Regards,
Andy Shevchenko