diff options
Diffstat (limited to 'drivers/usb/gadget/function/u_serial.c')
-rw-r--r-- | drivers/usb/gadget/function/u_serial.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index 6ded6345cd09..e0cd1e4c8892 100644 --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c | |||
@@ -375,10 +375,15 @@ __acquires(&port->port_lock) | |||
375 | */ | 375 | */ |
376 | { | 376 | { |
377 | struct list_head *pool = &port->write_pool; | 377 | struct list_head *pool = &port->write_pool; |
378 | struct usb_ep *in = port->port_usb->in; | 378 | struct usb_ep *in; |
379 | int status = 0; | 379 | int status = 0; |
380 | bool do_tty_wake = false; | 380 | bool do_tty_wake = false; |
381 | 381 | ||
382 | if (!port->port_usb) | ||
383 | return status; | ||
384 | |||
385 | in = port->port_usb->in; | ||
386 | |||
382 | while (!port->write_busy && !list_empty(pool)) { | 387 | while (!port->write_busy && !list_empty(pool)) { |
383 | struct usb_request *req; | 388 | struct usb_request *req; |
384 | int len; | 389 | int len; |