Skip to content

Commit b83b145

Browse files
sudipm-mukherjeedtor
authored andcommitted
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>
1 parent 2260c41 commit b83b145

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/input/keyboard/omap4-keypad.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
266266

267267
error = omap4_keypad_parse_dt(&pdev->dev, keypad_data);
268268
if (error)
269-
return error;
269+
goto err_free_keypad;
270270

271271
res = request_mem_region(res->start, resource_size(res), pdev->name);
272272
if (!res) {

0 commit comments

Comments
 (0)