On Fri, Jul 19 2013, Andrzej Pietrasiewicz wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
>
> Introduced by commit 59835a (usb: gadget: multi: use
> function framework for ACM.)
>
> Signed-off-by: Andrzej Pietrasiewicz <andrze...@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>

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

Having said that, one comment inline:

> ---
>  drivers/usb/gadget/multi.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
> index 032b96a..867db32 100644
> --- a/drivers/usb/gadget/multi.c
> +++ b/drivers/usb/gadget/multi.c
> @@ -225,8 +225,10 @@ static __init int cdc_do_config(struct usb_configuration 
> *c)
>  
>       /* implicit port_num is zero */
>       f_acm_multi = usb_get_function(fi_acm);
> -     if (IS_ERR(f_acm_multi))
> +     if (IS_ERR(f_acm_multi)) {
> +             ret = PTR_ERR(f_acm_multi);
>               goto err_func_acm;
> +     }

To be honest, I would just remove the err_func_acm label and change this
to: 

        if (IS_ERR(f_acm_multi))
                return ERR_PTR(f_acm_multi);

>  
>       ret = usb_add_function(c, f_acm_multi);
>       if (ret)

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: m...@google.com>--------------ooO--(_)--Ooo--

Attachment: signature.asc
Description: PGP signature

Reply via email to