Message ID | 20240926064910.17429-1-hubert.buczynski94@gmail.com |
---|---|
State | New |
Headers | show |
Series | usb: gadget: u_serial: fix null-ptr-deref in gs_start_io | expand |
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index 5111fcc0cac3..384f219fe01d 100644 --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c @@ -564,7 +564,7 @@ static int gs_start_io(struct gs_port *port) port->n_read = 0; started = gs_start_rx(port); - if (started) { + if (started && port->port.tty) { gs_start_tx(port); /* Unblock any pending writes into our circular buffer, in case * we didn't in gs_start_tx() */