Skip to content

Commit

Permalink
Input: omap4-keypad - fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sudip Mukherjee authored and Dmitry Torokhov committed Sep 28, 2015
1 parent 1a5e251 commit d79bdc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/omap4-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d79bdc7

Please sign in to comment.