Commit 41c8d0ad authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Miguel Ojeda

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

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

Fixes: d47d8836 ("auxdisplay: Add HD44780 Character LCD support")
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent 1c163f4c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment