USB: serial: ark3116: remove redundant interrupt-urb check
authorJohan Hovold <johan@kernel.org>
Tue, 31 Jan 2017 10:51:08 +0000 (11:51 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 31 Jan 2017 16:21:29 +0000 (17:21 +0100)
Remove redundant check of num_interrupt_in which has already been
verified in probe (killing a NULL-urb would also have been fine).

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ark3116.c

index d0fcff2..e3f6a4e 100644 (file)
@@ -347,8 +347,8 @@ static void ark3116_close(struct usb_serial_port *port)
        ark3116_write_reg(serial, UART_IER, 0);
 
        usb_serial_generic_close(port);
-       if (serial->num_interrupt_in)
-               usb_kill_urb(port->interrupt_in_urb);
+
+       usb_kill_urb(port->interrupt_in_urb);
 }
 
 static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)