aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-09-28 15:59:22 -0700
committerJiri Slaby <jslaby@suse.cz>2015-10-28 16:38:30 +0100
commit1096809fcb884bdfc9e0259840cbb491615d7fc9 (patch)
tree90be676e21ef28341389c1d3b7a6bdefe02aa3f3
parent0894eb8db1b1f6ab424132ee653bd495581b9af9 (diff)
Input: omap4-keypad - fix memory leak
commit d79bdc7f004404204a6ac07785f8d6717070ecdb upstream. If omap4_keypad_parse_dt() fails we returned the error code but we missed releasing keypad_data. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r--drivers/input/keyboard/omap4-keypad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 30acfd49fa6c..1ba3490b9ffe 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -284,7 +284,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
} else {
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);