From 33152d3660b8fe53763da1fa7715e2cdae910335 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 24 Feb 2025 19:27:41 +0200 Subject: [PATCH] auxdisplay: hd44780: Make use of hd44780_common_free() Use the symmetrical API to free the common resources. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven --- 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 @@ fail3: 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.50.1