From: Johan Hovold Date: Thu, 21 Mar 2013 11:36:29 +0000 (+0100) Subject: USB: cyberjack: remove bogus disconnect test in close X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1bc77f4df6b11948893cb1427fb6211c94f51364;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: cyberjack: remove bogus disconnect test in close Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 629bd2894506..de9253d63a48 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -166,11 +166,8 @@ static int cyberjack_open(struct tty_struct *tty, static void cyberjack_close(struct usb_serial_port *port) { - if (port->serial->dev) { - /* shutdown any bulk reads that might be going on */ - usb_kill_urb(port->write_urb); - usb_kill_urb(port->read_urb); - } + usb_kill_urb(port->write_urb); + usb_kill_urb(port->read_urb); } static int cyberjack_write(struct tty_struct *tty,