[PATCH v1 4/7] auxdisplay: hd44780: Make use of hd44780_common_free()
From: Andy Shevchenko
Date: Mon Feb 24 2025 - 12:33:46 EST
Use the symmetrical API to free the common resources.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
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