Skip to content

Commit

Permalink
USB: serial: mos7840: drop read-urb check
Browse files Browse the repository at this point in the history
Drop read-urb check which is always false from completion the callback.

The driver read-urb pointer is set at every open and is never cleared.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Johan Hovold committed Nov 12, 2019
1 parent 7b2faed commit f8e8dca
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
dev_dbg(&port->dev, "icount.rx is %d:\n", port->icount.rx);
}

if (!mos7840_port->read_urb) {
dev_dbg(&port->dev, "%s", "URB KILLED !!!\n");
mos7840_port->read_urb_busy = false;
return;
}

if (mos7840_port->has_led)
mos7840_led_activity(port);

Expand Down Expand Up @@ -1377,11 +1371,6 @@ static void mos7840_set_termios(struct tty_struct *tty,

mos7840_change_port_settings(tty, mos7840_port, old_termios);

if (!mos7840_port->read_urb) {
dev_dbg(&port->dev, "%s", "URB KILLED !!!!!\n");
return;
}

if (!mos7840_port->read_urb_busy) {
mos7840_port->read_urb_busy = true;
status = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
Expand Down

0 comments on commit f8e8dca

Please sign in to comment.