auxdisplay: hd44780: Fix memory leak on ->remove()

We have to free on ->remove() the allocated resources on ->probe().

Fixes: d47d88361f ("auxdisplay: Add HD44780 Character LCD support")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
This commit is contained in:
Andy Shevchenko 2019-03-12 16:44:28 +02:00 committed by Miguel Ojeda
parent 1c163f4c7b
commit 41c8d0adf3
1 changed files with 2 additions and 0 deletions

View File

@ -280,6 +280,8 @@ static int hd44780_remove(struct platform_device *pdev)
struct charlcd *lcd = platform_get_drvdata(pdev);
charlcd_unregister(lcd);
kfree(lcd);
return 0;
}