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:05:45 -0700
commitd79bdc7f004404204a6ac07785f8d6717070ecdb (patch)
tree00c988027c0f8716bd15adc39601c60daf12b239 /drivers/input
parent1a5e251996e1b602f2ddc9261ee9de0ca1875bfa (diff)
downloadlinux-d79bdc7f004404204a6ac07785f8d6717070ecdb.tar.bz2
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 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) {