summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-09-28 15:59:22 -0700
committerSasha Levin <sasha.levin@oracle.com>2015-12-03 09:57:13 -0500
commite871155e221dbb3397ab7e6ed5267c0958094636 (patch)
tree27ef0575539eb02b2140e635170800ff5f69cf45 /drivers
parentbbdc0806b4a91db4bbb55c10be4889d7aa61e92b (diff)
Input: omap4-keypad - fix memory leak
[ Upstream commit d79bdc7f004404204a6ac07785f8d6717070ecdb ] 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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers')
-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 024b7bdffe5b..3ab045369c0c 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) {