Commit 19c61853 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: serial: remove bogus disconnect test in cleanup



Remove bogus (and unnecessary) test for serial->dev being NULL in
cleanup.

The device is never cleared, and cleanup is never called after a
completed disconnect anyway.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6d144bc
Loading
Loading
Loading
Loading
+10 −14
Original line number Diff line number Diff line
@@ -104,12 +104,9 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_open);

static void generic_cleanup(struct usb_serial_port *port)
{
	struct usb_serial *serial = port->serial;
	unsigned long flags;
	int i;

	if (serial->dev) {
		/* shutdown any bulk transfers that might be going on */
	if (port->bulk_out_size) {
		for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i)
			usb_kill_urb(port->write_urbs[i]);
@@ -123,7 +120,6 @@ static void generic_cleanup(struct usb_serial_port *port)
			usb_kill_urb(port->read_urbs[i]);
	}
}
}

void usb_serial_generic_close(struct usb_serial_port *port)
{