This check an inherent race. It opens a race where
an error code has already been set or cleared yet
the URB has not been given back. We cannot do
such an optimization and must unlink unconditionally.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
dev_warn(&net->dev, "Tx timed out.\n");
/* Tear the waiting frame off the list */
- if (odev->mux_bulk_tx_urb &&
- (odev->mux_bulk_tx_urb->status == -EINPROGRESS))
+ if (odev->mux_bulk_tx_urb)
usb_unlink_urb(odev->mux_bulk_tx_urb);
/* Update statistics */