Skip to content

Commit

Permalink
USB: mos7720: remove incorrect read-urb check
Browse files Browse the repository at this point in the history
Remove incorrect and unnecessary check for port->read_urb which is not
set to NULL, contrary to what seems to be assumed, when urb is killed.

Compile only-tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 15, 2011
1 parent 4556143 commit 6d0f41a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/usb/serial/mos7720.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,6 @@ static void mos7720_bulk_in_callback(struct urb *urb)
}
tty_kref_put(tty);

if (!port->read_urb) {
dbg("URB KILLED !!!");
return;
}

if (port->read_urb->status != -EINPROGRESS) {
port->read_urb->dev = port->serial->dev;

Expand Down Expand Up @@ -1786,11 +1781,6 @@ static void mos7720_set_termios(struct tty_struct *tty,
/* change the port settings to the new ones specified */
change_port_settings(tty, mos7720_port, old_termios);

if (!port->read_urb) {
dbg("%s", "URB KILLED !!!!!");
return;
}

if (port->read_urb->status != -EINPROGRESS) {
port->read_urb->dev = serial->dev;
status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
Expand Down

0 comments on commit 6d0f41a

Please sign in to comment.