lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Input: omap-keypad: fix memory leak
On Fri, Sep 18, 2015 at 04:54:40PM +0530, Sudip Mukherjee wrote:
> 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>

Applied, thank you.

> ---
> drivers/input/keyboard/omap4-keypad.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index b052afe..6639b2b 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) {
> --
> 1.9.1
>

--
Dmitry


\
 
 \ /
  Last update: 2015-09-29 01:21    [W:0.031 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site