Commit 28e679ae authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: digi_acceleport: 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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1bc77f4d
Loading
Loading
Loading
Loading
+45 −47
Original line number Original line Diff line number Diff line
@@ -1149,7 +1149,6 @@ static void digi_close(struct usb_serial_port *port)
	if (port->serial->disconnected)
	if (port->serial->disconnected)
		goto exit;
		goto exit;


	if (port->serial->dev) {
	/* FIXME: Transmit idle belongs in the wait_unti_sent path */
	/* FIXME: Transmit idle belongs in the wait_unti_sent path */
	digi_transmit_idle(port, DIGI_CLOSE_TIMEOUT);
	digi_transmit_idle(port, DIGI_CLOSE_TIMEOUT);


@@ -1185,8 +1184,8 @@ static void digi_close(struct usb_serial_port *port)


	ret = digi_write_oob_command(port, buf, 20, 0);
	ret = digi_write_oob_command(port, buf, 20, 0);
	if (ret != 0)
	if (ret != 0)
			dev_dbg(&port->dev, "digi_close: write oob failed, ret=%d\n", ret);
		dev_dbg(&port->dev, "digi_close: write oob failed, ret=%d\n",

									ret);
	/* wait for final commands on oob port to complete */
	/* wait for final commands on oob port to complete */
	prepare_to_wait(&priv->dp_flush_wait, &wait,
	prepare_to_wait(&priv->dp_flush_wait, &wait,
			TASK_INTERRUPTIBLE);
			TASK_INTERRUPTIBLE);
@@ -1195,7 +1194,6 @@ static void digi_close(struct usb_serial_port *port)


	/* shutdown any outstanding bulk writes */
	/* shutdown any outstanding bulk writes */
	usb_kill_urb(port->write_urb);
	usb_kill_urb(port->write_urb);
	}
exit:
exit:
	spin_lock_irq(&priv->dp_port_lock);
	spin_lock_irq(&priv->dp_port_lock);
	priv->dp_write_urb_in_use = 0;
	priv->dp_write_urb_in_use = 0;