Skip to content

Commit

Permalink
USB: serial: ark3116: remove redundant interrupt-urb check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold committed Jan 31, 2017
1 parent 4481200 commit 41a2af9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/serial/ark3116.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41a2af9

Please sign in to comment.