Skip to content

Commit 9b98a7d

Browse files
Haoxiang Liandy-shev
authored andcommitted
auxdisplay: hd44780: Fix an API misuse in hd44780.c
Variable allocated by charlcd_alloc() should be released by charlcd_free(). The following patch changed kfree() to charlcd_free() to fix an API misuse. Fixes: 718e05e ("auxdisplay: Introduce hd44780_common.[ch]") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent fce85f3 commit 9b98a7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/auxdisplay/hd44780.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static int hd44780_probe(struct platform_device *pdev)
313313
fail3:
314314
kfree(hd);
315315
fail2:
316-
kfree(lcd);
316+
charlcd_free(lcd);
317317
fail1:
318318
kfree(hdc);
319319
return ret;
@@ -328,7 +328,7 @@ static void hd44780_remove(struct platform_device *pdev)
328328
kfree(hdc->hd44780);
329329
kfree(lcd->drvdata);
330330

331-
kfree(lcd);
331+
charlcd_free(lcd);
332332
}
333333

334334
static const struct of_device_id hd44780_of_match[] = {

0 commit comments

Comments
 (0)