On Mon, Dec 17, 2012 at 02:37:17PM +0100, Sebastian Andrzej Siewior wrote:
> diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c
> index 60937d0..93c5b4c 100644
> --- a/drivers/usb/gadget/nokia.c
> +++ b/drivers/usb/gadget/nokia.c
> @@ -191,8 +203,10 @@ static int __init nokia_bind(struct usb_composite_dev 
> *cdev)
>  err_usb:
>       gether_cleanup();
>  err_ether:
> -     gserial_cleanup();
> -err_serial:
> +     cur_line--;
> +     while (cur_line > 0)
Here it should be >=

> +             gserial_free_line(tty_lines[cur_line--]);
> +
>       gphonet_cleanup();
>  err_phonet:
>       return status;
> diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
> index 4816f49..eaad0ca 100644
> --- a/drivers/usb/gadget/serial.c
> +++ b/drivers/usb/gadget/serial.c
> @@ -209,7 +222,9 @@ static int __init gs_bind(struct usb_composite_dev *cdev)
>       return 0;
>  
>  fail:
> -     gserial_cleanup();
> +     cur_line--;
> +     while (cur_line > 0)
> +             gserial_free_line(tty_lines[cur_line]);

And this should be >= and a -- of cur_line is required.

>       return status;
>  }
>  

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to