diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-29 01:59:22 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-09-29 02:41:07 +0300 |
commit | b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2 (patch) | |
tree | ce854592b5b073d1e33398f0b0b0e32ea4666907 | |
parent | 2260c419b52bd71166aa96fac9081388f76df5e0 (diff) | |
download | linux-b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2.tar.xz |
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.c | 2 |
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) { |