[PATCH 5.13 268/300] auxdisplay: hd44780: Fix oops on module unloading
From: Greg Kroah-Hartman
Date: Mon Sep 13 2021 - 10:20:15 EST
From: Lars Poeschel <poeschel@xxxxxxxxxxx>
commit 333ff32d54cdefc2e479892e7f15ac91e026b57d upstream.
Fixes: 718e05ed92ec ("auxdisplay: Introduce hd44780_common.[ch]")
Cc: stable@xxxxxxxxxxxxxxx
Link: https://lore.kernel.org/lkml/CAHp75VfKyqy+vM0XkP9Yb+znGOTVT4zYCRY3A3nQ7C3WNUVN0g@xxxxxxxxxxxxxx/
Reported-By: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Signed-off-by: Lars Poeschel <poeschel@xxxxxxxxxxx>
Tested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
[added Link, Fixes, Cc stable tags, edited message]
Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/auxdisplay/hd44780.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -323,8 +323,8 @@ static int hd44780_remove(struct platfor
{
struct charlcd *lcd = platform_get_drvdata(pdev);
- kfree(lcd->drvdata);
charlcd_unregister(lcd);
+ kfree(lcd->drvdata);
kfree(lcd);
return 0;