提交 41c8d0ad 编写于 作者: A Andy Shevchenko 提交者: 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: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册