Input: omap-keypad: fix memory leak
Subsystems (2)
PATCH 1/1 Input: omap-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 <[email protected]>
--- drivers/input/keyboard/omap4-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/omap4-keypad.c +1 -1
@@ -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) {
Signature · 1 line
1.9.1
Quoted 4 lines · Sudip Mukherjee
If
omap4_keypad_parse_dt()fails we returned the error code but we missed releasingkeypad_data.Signed-off-by Sudip Mukherjee <[email protected]>
Applied, thank you.
Quoted 20 lines
--- drivers/input/keyboard/omap4-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/keyboard/omap4-keypad.c +1
-1@@ -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) {Signature · 1 line
1.9.1
Signature · 1 line
Dmitry