diff mbox

USB: Gadget: Webcam: Return correct result of bind

Message ID 1308941246-32089-1-git-send-email-jaswinder.singh@linaro.org
State Accepted
Commit 28f75f4db1e5ea1366375b2a6c40d66659e0e7ec
Headers show

Commit Message

Jassi Brar June 24, 2011, 6:47 p.m. UTC
The config bind was reported success even if usb_add_function
failed. Fix the return value.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
 drivers/usb/gadget/f_uvc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Laurent Pinchart June 24, 2011, 6:55 p.m. UTC | #1
Hi Jassi,

Thanks for the patch.

On Friday 24 June 2011 20:47:26 Jassi Brar wrote:
> The config bind was reported success even if usb_add_function
> failed. Fix the return value.
> 
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/usb/gadget/f_uvc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
> index be446b7..c847b9e 100644
> --- a/drivers/usb/gadget/f_uvc.c
> +++ b/drivers/usb/gadget/f_uvc.c
> @@ -649,7 +649,7 @@ uvc_bind_config(struct usb_configuration *c,
>  	if (ret)
>  		kfree(uvc);
> 
> -	return 0;
> +	return ret;
> 
>  error:
>  	kfree(uvc);
Jassi Brar June 28, 2011, 4:33 p.m. UTC | #2
[CC'ing Greg with correct email this time]

On 25 June 2011 00:17, Jassi Brar <jaswinder.singh@linaro.org> wrote:
> The config bind was reported success even if usb_add_function
> failed. Fix the return value.
>
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
> ---
>  drivers/usb/gadget/f_uvc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
> index be446b7..c847b9e 100644
> --- a/drivers/usb/gadget/f_uvc.c
> +++ b/drivers/usb/gadget/f_uvc.c
> @@ -649,7 +649,7 @@ uvc_bind_config(struct usb_configuration *c,
>        if (ret)
>                kfree(uvc);
>
> -       return 0;
> +       return ret;
>
>  error:
>        kfree(uvc);
> --
> 1.7.4.1
>
>
Felipe Balbi July 5, 2011, 1:51 p.m. UTC | #3
On Sat, Jun 25, 2011 at 12:17:26AM +0530, Jassi Brar wrote:
> The config bind was reported success even if usb_add_function
> failed. Fix the return value.
> 
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

applied, thanks
diff mbox

Patch

diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index be446b7..c847b9e 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -649,7 +649,7 @@  uvc_bind_config(struct usb_configuration *c,
 	if (ret)
 		kfree(uvc);
 
-	return 0;
+	return ret;
 
 error:
 	kfree(uvc);