From: Sudip Mukherjee Date: Mon, 28 Sep 2015 22:59:22 +0000 (-0700) Subject: Input: omap4-keypad - fix memory leak X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d79bdc7f004404204a6ac07785f8d6717070ecdb;p=openwrt%2Fstaging%2Fblogic.git Input: omap4-keypad - fix memory leak If omap4_keypad_parse_dt() fails we returned the error code but we missed releasing keypad_data. Signed-off-by: Sudip Mukherjee Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index b052afec9a11..6639b2b8528a 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -266,7 +266,7 @@ static int omap4_keypad_probe(struct platform_device *pdev) error = omap4_keypad_parse_dt(&pdev->dev, keypad_data); if (error) - return error; + goto err_free_keypad; res = request_mem_region(res->start, resource_size(res), pdev->name); if (!res) {