aboutsummaryrefslogtreecommitdiffstats
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
parentInput: serio - fix blocking of parport (diff)
downloadlinux-dev-d79bdc7f004404204a6ac07785f8d6717070ecdb.tar.xz
linux-dev-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>
-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) {