summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-09-28 15:59:22 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-09-28 16:41:07 -0700
commitb83b14598ffbb59bc96dbd3d4350a3b8f0287bb2 (patch)
treece854592b5b073d1e33398f0b0b0e32ea4666907 /drivers/input
parent2260c419b52bd71166aa96fac9081388f76df5e0 (diff)
downloadop-kernel-dev-b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2.zip
op-kernel-dev-b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2.tar.gz
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 <sudip@vectorindia.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-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 b052afe..6639b2b 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) {
OpenPOWER on IntegriCloud