auxdisplay: hd44780: Fix oops on module unloading

Fixes: 718e05ed92 ("auxdisplay: Introduce hd44780_common.[ch]")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/lkml/CAHp75VfKyqy+vM0XkP9Yb+znGOTVT4zYCRY3A3nQ7C3WNUVN0g@mail.gmail.com/
Reported-By: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[added Link, Fixes, Cc stable tags, edited message]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
Lars Poeschel 2021-07-14 13:02:28 +02:00 committed by Miguel Ojeda
parent c784e46c84
commit 333ff32d54
1 changed files with 1 additions and 1 deletions

View File

@ -323,8 +323,8 @@ static int hd44780_remove(struct platform_device *pdev)
{
struct charlcd *lcd = platform_get_drvdata(pdev);
kfree(lcd->drvdata);
charlcd_unregister(lcd);
kfree(lcd->drvdata);
kfree(lcd);
return 0;