On Mon, Jun 08 2015, Sanjay Singh Rawat wrote:
> After the worker thread is launched, bind function is doing further
> configuration. In case of failure stop the thread.
>
> Signed-off-by: Sanjay Singh Rawat <snjs...@gmail.com>

Acked-by: Michal Nazarewicz <min...@mina86.com>

> ---
>  drivers/usb/gadget/function/f_mass_storage.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_mass_storage.c 
> b/drivers/usb/gadget/function/f_mass_storage.c
> index 3cc109f..0e90e38 100644
> --- a/drivers/usb/gadget/function/f_mass_storage.c
> +++ b/drivers/usb/gadget/function/f_mass_storage.c
> @@ -3082,7 +3082,7 @@ static int fsg_bind(struct usb_configuration *c, struct 
> usb_function *f)
>       /* New interface */
>       i = usb_interface_id(c, f);
>       if (i < 0)
> -             return i;
> +             goto fail;
>       fsg_intf_desc.bInterfaceNumber = i;
>       fsg->interface_number = i;
>  
> @@ -3125,7 +3125,10 @@ static int fsg_bind(struct usb_configuration *c, 
> struct usb_function *f)
>  
>  autoconf_fail:
>       ERROR(fsg, "unable to autoconfigure all endpoints\n");
> -     return -ENOTSUPP;
> +     i = -ENOTSUPP;
> +fail:
> +     kthread_stop(fsg->common->thread_task);
> +     return i;
>  }
>  
>  /****************************** ALLOCATE FUNCTION *************************/
> -- 
> 1.8.3.2
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<m...@google.com>--<xmpp:min...@jabber.org>--ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to