diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index f5c3896b1d959a5cbf66e705ba21038ef51553e5..433b3f44f42e2dc36e38e2b7dc85be3e48b3785a 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -2163,8 +2163,7 @@ static void gs_free_ports(struct gs_dev *dev) port->port_dev = NULL; wake_up_interruptible(&port->port_write_wait); if (port->port_tty) { - wake_up_interruptible(&port->port_tty->read_wait); - wake_up_interruptible(&port->port_tty->write_wait); + tty_hangup(port->port_tty); } spin_unlock_irqrestore(&port->port_lock, flags); } else {