Re: [PATCH] tty: Fix various bogus WARN checks in the usb serial layer

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

 



Am Dienstag, 9. Februar 2010 17:30:20 schrieb Alan Stern:
> @@ -530,23 +526,19 @@ static void aircable_read_bulk_callback(
>         }
>         tty_kref_put(tty);
>  
> -       /* Schedule the next read if we are still open */
> -       if (port->port.count) {
> -               usb_fill_bulk_urb(port->read_urb, port->serial->dev,
> -                                 usb_rcvbulkpipe(port->serial->dev,
> -                                         port->bulk_in_endpointAddress),
> -                                 port->read_urb->transfer_buffer,
> -                                 port->read_urb->transfer_buffer_length,
> -                                 aircable_read_bulk_callback, port);
> -
> -               result = usb_submit_urb(urb, GFP_ATOMIC);
> -               if (result)
> -                       dev_err(&urb->dev->dev,
> -                               "%s - failed resubmitting read urb, error %d\n",
> -                               __func__, result);
> -       }
> -
> -       return;
> +       /* Schedule the next read */
> +       usb_fill_bulk_urb(port->read_urb, port->serial->dev,
> +                         usb_rcvbulkpipe(port->serial->dev,
> +                                 port->bulk_in_endpointAddress),
> +                         port->read_urb->transfer_buffer,
> +                         port->read_urb->transfer_buffer_length,
> +                         aircable_read_bulk_callback, port);
> +
> +       result = usb_submit_urb(urb, GFP_ATOMIC);
> +       if (result)
> +               dev_err(&urb->dev->dev,
> +                       "%s - failed resubmitting read urb, error %d\n",
> +                       __func__, result);

The function is unimpaired, but you emit an error message to the log
when you close. You should check for -EPERM.

	Regards
		Oliver
--
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