Commit 9b98a7d2 authored by Haoxiang Li's avatar Haoxiang Li Committed by Andy Shevchenko
Browse files

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: 718e05ed ("auxdisplay: Introduce hd44780_common.[ch]")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarHaoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent fce85f3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ static int hd44780_probe(struct platform_device *pdev)
fail3:
	kfree(hd);
fail2:
	kfree(lcd);
	charlcd_free(lcd);
fail1:
	kfree(hdc);
	return ret;
@@ -328,7 +328,7 @@ static void hd44780_remove(struct platform_device *pdev)
	kfree(hdc->hd44780);
	kfree(lcd->drvdata);

	kfree(lcd);
	charlcd_free(lcd);
}

static const struct of_device_id hd44780_of_match[] = {