* [PATCH] Input: snvs_pwrkey - drop input_free_device call if input_register_device fails
@ 2016-09-19 1:49 Axel Lin
2016-09-23 22:01 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2016-09-19 1:49 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Frank Li, Robin Gong, Shawn Guo, linux-input, Axel Lin
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 <axel.lin@ingics.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Input: snvs_pwrkey - drop input_free_device call if input_register_device fails
2016-09-19 1:49 [PATCH] Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Axel Lin
@ 2016-09-23 22:01 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2016-09-23 22:01 UTC (permalink / raw)
To: Axel Lin; +Cc: Frank Li, Robin Gong, Shawn Guo, linux-input
On Mon, Sep 19, 2016 at 09:49:16AM +0800, Axel Lin wrote:
> 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 <axel.lin@ingics.com>
Applied, thank you.
> ---
> 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
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-23 22:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19 1:49 [PATCH] Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Axel Lin
2016-09-23 22:01 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).