Thread (2 messages) 2 messages, 2 authors, 2016-09-23
STALE3533d

[PATCH] Input: snvs_pwrkey - drop input_free_device call if input_register_device fails

From: Axel Lin <hidden>
Date: 2016-09-19 01:49:27
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

Current code uses devm_input_allocate_device() so don't explicitly call
input_free_device if input_register_device fails.

Signed-off-by: Axel Lin <redacted>
---
 drivers/input/keyboard/snvs_pwrkey.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
index 24a9f59..7544888 100644
--- a/drivers/input/keyboard/snvs_pwrkey.c
+++ b/drivers/input/keyboard/snvs_pwrkey.c
@@ -168,7 +168,6 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
 	error = input_register_device(input);
 	if (error < 0) {
 		dev_err(&pdev->dev, "failed to register input device\n");
-		input_free_device(input);
 		return error;
 	}
 
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help