Commit bfd5834e authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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

[ Upstream commit 41c8d0ad ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b042245b
......@@ -302,6 +302,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