USB: mos7720: remove incorrect read-urb check
authorJohan Hovold <jhovold@gmail.com>
Sun, 6 Nov 2011 18:06:26 +0000 (19:06 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Nov 2011 18:33:13 +0000 (10:33 -0800)
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>
drivers/usb/serial/mos7720.c

index 3524a105d042f110a2ec6ce1aa90527c0e71b8ba..b4f219ad2ea25b79e1eb228da8af75c6bc8930d1 100644 (file)
@@ -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;
 
@@ -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);