Re: [PATCH 16/16] USB: cdc-acm: re-write read processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 22, 2011 at 11:35:52AM +0100, Oliver Neukum wrote:
> Am Dienstag, 22. März 2011, 11:12:24 schrieb Johan Hovold:
> > -       if (!ACM_READY(acm)) {
> > -               dev_dbg(&acm->data->dev, "%s - acm not ready\n", __func__);
> > -               return;
> > +       dev_vdbg(&acm->data->dev, "%s - urb %d\n", __func__, index);
> > +
> > +       res = usb_submit_urb(acm->read_urbs[index], mem_flags);
> > +       if (res && res != -EPERM) {
> > +               dev_err(&acm->data->dev, "%s - usb_submit_urb failed: %d\n",
> > +                                                               __func__, res);
> > +               set_bit(index, &acm->read_urbs_free);
> > +               return res;
> 
> You surely want to declare it free again on any error, including -EPERM.

Indeed.

Thanks for spotting that,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux