summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-09-29 00:59:22 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-09-29 01:05:45 +0200
commitd79bdc7f004404204a6ac07785f8d6717070ecdb (patch)
tree00c988027c0f8716bd15adc39601c60daf12b239 /drivers/input
parentInput: serio - fix blocking of parport (diff)
downloadlinux-d79bdc7f004404204a6ac07785f8d6717070ecdb.tar.xz
linux-d79bdc7f004404204a6ac07785f8d6717070ecdb.zip
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) {