diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-03-12 15:44:28 +0100 |
---|---|---|
committer | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2019-03-17 08:48:04 +0100 |
commit | 41c8d0adf3c4df1867d98cee4a2c4531352a33ad (patch) | |
tree | af310725645565986b53d94dd8c9961228a370df /drivers/auxdisplay/hd44780.c | |
parent | Linux 5.0 (diff) | |
download | linux-41c8d0adf3c4df1867d98cee4a2c4531352a33ad.tar.xz linux-41c8d0adf3c4df1867d98cee4a2c4531352a33ad.zip |
auxdisplay: hd44780: Fix memory leak on ->remove()
We have to free on ->remove() the allocated resources on ->probe().
Fixes: d47d88361fee ("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>
Diffstat (limited to 'drivers/auxdisplay/hd44780.c')
-rw-r--r-- | drivers/auxdisplay/hd44780.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c index 9ad93ea42fdc..3cde351fb5c9 100644 --- a/drivers/auxdisplay/hd44780.c +++ b/drivers/auxdisplay/hd44780.c @@ -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; } |