linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path
@ 2011-07-14  5:07 Axel Lin
  2011-07-14  9:43 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-07-14  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Kosina, Dmitry Torokhov, Sergei Kolzun, linux-input

hid_hw_stop() must be called in ax_probe() error path if hid_hw_start()
was successful.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/hid/hid-axff.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c
index b455428..1215141 100644
--- a/drivers/hid/hid-axff.c
+++ b/drivers/hid/hid-axff.c
@@ -154,6 +154,7 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	error = hid_hw_open(hdev);
 	if (error) {
 		dev_err(&hdev->dev, "hw open failed\n");
+		hid_hw_stop(hdev);
 		return error;
 	}
 
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path
  2011-07-14  5:07 [PATCH] HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path Axel Lin
@ 2011-07-14  9:43 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2011-07-14  9:43 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Dmitry Torokhov, Sergei Kolzun, linux-input

On Thu, 14 Jul 2011, Axel Lin wrote:

> hid_hw_stop() must be called in ax_probe() error path if hid_hw_start()
> was successful.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/hid/hid-axff.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c
> index b455428..1215141 100644
> --- a/drivers/hid/hid-axff.c
> +++ b/drivers/hid/hid-axff.c
> @@ -154,6 +154,7 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id)
>  	error = hid_hw_open(hdev);
>  	if (error) {
>  		dev_err(&hdev->dev, "hw open failed\n");
> +		hid_hw_stop(hdev);
>  		return error;
>  	}

Good catch, applied. Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-14  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-14  5:07 [PATCH] HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path Axel Lin
2011-07-14  9:43 ` Jiri Kosina

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).