diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-29 00:59:22 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-09-29 01:41:07 +0200 |
commit | b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2 (patch) | |
tree | ce854592b5b073d1e33398f0b0b0e32ea4666907 /drivers/input/keyboard/omap4-keypad.c | |
parent | Input: db9 - use parallel port device model (diff) | |
download | linux-b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2.tar.xz linux-b83b14598ffbb59bc96dbd3d4350a3b8f0287bb2.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/keyboard/omap4-keypad.c')
-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) { |