diff options
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 3a9d14384a43..11c8b97a5177 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -1481,7 +1481,7 @@ static void rx_data_softint(struct work_struct *work) | |||
1481 | struct whiteheat_private *info = | 1481 | struct whiteheat_private *info = |
1482 | container_of(work, struct whiteheat_private, rx_work); | 1482 | container_of(work, struct whiteheat_private, rx_work); |
1483 | struct usb_serial_port *port = info->port; | 1483 | struct usb_serial_port *port = info->port; |
1484 | struct tty_struct *tty = port->port.tty; | 1484 | struct tty_struct *tty = tty_port_tty_get(&port->port); |
1485 | struct whiteheat_urb_wrap *wrap; | 1485 | struct whiteheat_urb_wrap *wrap; |
1486 | struct urb *urb; | 1486 | struct urb *urb; |
1487 | unsigned long flags; | 1487 | unsigned long flags; |
@@ -1493,7 +1493,7 @@ static void rx_data_softint(struct work_struct *work) | |||
1493 | spin_lock_irqsave(&info->lock, flags); | 1493 | spin_lock_irqsave(&info->lock, flags); |
1494 | if (info->flags & THROTTLED) { | 1494 | if (info->flags & THROTTLED) { |
1495 | spin_unlock_irqrestore(&info->lock, flags); | 1495 | spin_unlock_irqrestore(&info->lock, flags); |
1496 | return; | 1496 | goto out; |
1497 | } | 1497 | } |
1498 | 1498 | ||
1499 | list_for_each_safe(tmp, tmp2, &info->rx_urb_q) { | 1499 | list_for_each_safe(tmp, tmp2, &info->rx_urb_q) { |
@@ -1513,7 +1513,7 @@ static void rx_data_softint(struct work_struct *work) | |||
1513 | spin_unlock_irqrestore(&info->lock, flags); | 1513 | spin_unlock_irqrestore(&info->lock, flags); |
1514 | tty_flip_buffer_push(tty); | 1514 | tty_flip_buffer_push(tty); |
1515 | schedule_work(&info->rx_work); | 1515 | schedule_work(&info->rx_work); |
1516 | return; | 1516 | goto out; |
1517 | } | 1517 | } |
1518 | tty_insert_flip_string(tty, urb->transfer_buffer, len); | 1518 | tty_insert_flip_string(tty, urb->transfer_buffer, len); |
1519 | sent += len; | 1519 | sent += len; |
@@ -1536,6 +1536,8 @@ static void rx_data_softint(struct work_struct *work) | |||
1536 | 1536 | ||
1537 | if (sent) | 1537 | if (sent) |
1538 | tty_flip_buffer_push(tty); | 1538 | tty_flip_buffer_push(tty); |
1539 | out: | ||
1540 | tty_kref_put(tty); | ||
1539 | } | 1541 | } |
1540 | 1542 | ||
1541 | 1543 | ||