linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix error path in wacom_probe
@ 2011-02-09  7:37 Alexander Strakh
  2011-02-09  8:50 ` Dmitry Torokhov
  2011-02-10 13:18 ` Henrik Rydberg
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Strakh @ 2011-02-09  7:37 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: rydberg, oneukum, oblivian, linux-input, linux-kernel,
	Alexander Strakh, Alexander Strakh

From: Alexander Strakh <cromlehg@gmail.com>

  In file drivers/input/tablet/wacom_sys.c in
wacom_probe after error we can goto label2. In
 this case function usb_free was not called. 
 It will be right goto for the label tail3.

        wacom->irq = usb_alloc_urb(0, GFP_KERNEL);

	...

        /* Retrieve the physical and logical size for OEM devices */
        error = wacom_retrieve_hid_descriptor(intf, features);
        if (error)
                goto fail2;
	...
	 fail3: usb_free_urb(wacom->irq);
	 fail2: usb_free_coherent(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma);

Replaced wrong transition.

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
---
 drivers/input/tablet/wacom_sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index fc38149..cf8fb9f 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -519,7 +519,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
 	/* Retrieve the physical and logical size for OEM devices */
 	error = wacom_retrieve_hid_descriptor(intf, features);
 	if (error)
-		goto fail2;
+		goto fail3;
 
 	wacom_setup_device_quirks(features);
 
-- 
1.7.1


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

* Re: [PATCH 1/1] Fix error path in wacom_probe
  2011-02-09  7:37 [PATCH 1/1] Fix error path in wacom_probe Alexander Strakh
@ 2011-02-09  8:50 ` Dmitry Torokhov
  2011-02-10 13:18 ` Henrik Rydberg
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2011-02-09  8:50 UTC (permalink / raw)
  To: Alexander Strakh
  Cc: rydberg, oneukum, oblivian, linux-input, linux-kernel,
	Alexander Strakh

On Wed, Feb 09, 2011 at 10:37:28AM +0300, Alexander Strakh wrote:
> From: Alexander Strakh <cromlehg@gmail.com>
> 
>   In file drivers/input/tablet/wacom_sys.c in
> wacom_probe after error we can goto label2. In
>  this case function usb_free was not called. 
>  It will be right goto for the label tail3.
> 
>         wacom->irq = usb_alloc_urb(0, GFP_KERNEL);
> 
> 	...
> 
>         /* Retrieve the physical and logical size for OEM devices */
>         error = wacom_retrieve_hid_descriptor(intf, features);
>         if (error)
>                 goto fail2;
> 	...
> 	 fail3: usb_free_urb(wacom->irq);
> 	 fail2: usb_free_coherent(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma);
> 
> Replaced wrong transition.
> 
> Signed-off-by: Alexander Strakh <strakh@ispras.ru>

Will apply, thank you.

> ---
>  drivers/input/tablet/wacom_sys.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
> index fc38149..cf8fb9f 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -519,7 +519,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
>  	/* Retrieve the physical and logical size for OEM devices */
>  	error = wacom_retrieve_hid_descriptor(intf, features);
>  	if (error)
> -		goto fail2;
> +		goto fail3;
>  
>  	wacom_setup_device_quirks(features);
>  
> -- 
> 1.7.1
> 

-- 
Dmitry

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

* Re: [PATCH 1/1] Fix error path in wacom_probe
  2011-02-09  7:37 [PATCH 1/1] Fix error path in wacom_probe Alexander Strakh
  2011-02-09  8:50 ` Dmitry Torokhov
@ 2011-02-10 13:18 ` Henrik Rydberg
  1 sibling, 0 replies; 3+ messages in thread
From: Henrik Rydberg @ 2011-02-10 13:18 UTC (permalink / raw)
  To: Alexander Strakh
  Cc: dmitry.torokhov, oneukum, oblivian, linux-input, linux-kernel,
	Alexander Strakh

Hi Alexander,

>   In file drivers/input/tablet/wacom_sys.c in
> wacom_probe after error we can goto label2. In
>  this case function usb_free was not called. 
>  It will be right goto for the label tail3.
> 
>         wacom->irq = usb_alloc_urb(0, GFP_KERNEL);
> 
> 	...
> 
>         /* Retrieve the physical and logical size for OEM devices */
>         error = wacom_retrieve_hid_descriptor(intf, features);
>         if (error)
>                 goto fail2;
> 	...
> 	 fail3: usb_free_urb(wacom->irq);
> 	 fail2: usb_free_coherent(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma);
> 
> Replaced wrong transition.

Yep, thanks for this.

Acked-by: Henrik Rydberg <rydberg@euromail.se>

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

end of thread, other threads:[~2011-02-10 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-09  7:37 [PATCH 1/1] Fix error path in wacom_probe Alexander Strakh
2011-02-09  8:50 ` Dmitry Torokhov
2011-02-10 13:18 ` Henrik Rydberg

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