aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/generic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 8f78d7b8e888..2a3196a2c66c 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -519,10 +519,13 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb)
519 port->write_urb_busy = 0; 519 port->write_urb_busy = 0;
520 spin_unlock_irqrestore(&port->lock, flags); 520 spin_unlock_irqrestore(&port->lock, flags);
521 521
522 if (status) 522 if (status) {
523 spin_lock_irqsave(&port->lock, flags);
523 kfifo_reset_out(&port->write_fifo); 524 kfifo_reset_out(&port->write_fifo);
524 else 525 spin_unlock_irqrestore(&port->lock, flags);
526 } else {
525 usb_serial_generic_write_start(port); 527 usb_serial_generic_write_start(port);
528 }
526 } 529 }
527 530
528 if (status) 531 if (status)