Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89e54e44 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: cdc-acm: remove redundant disconnected test from shutdown



Remove redundant disconnect test from shutdown(), which is never called
post disconnect() where we do synchronous hangup.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bbf0cb3e
Loading
Loading
Loading
Loading
+19 −22
Original line number Diff line number Diff line
@@ -594,8 +594,6 @@ static void acm_port_shutdown(struct tty_port *port)

	dev_dbg(&acm->control->dev, "%s\n", __func__);

	mutex_lock(&acm->mutex);
	if (!acm->disconnected) {
	pm_err = usb_autopm_get_interface(acm->control);
	acm_set_control(acm, acm->ctrlout = 0);

@@ -613,12 +611,11 @@ static void acm_port_shutdown(struct tty_port *port)
		usb_kill_urb(acm->wb[i].urb);
	for (i = 0; i < acm->rx_buflimit; i++)
		usb_kill_urb(acm->read_urbs[i]);

	acm->control->needs_remote_wakeup = 0;
	if (!pm_err)
		usb_autopm_put_interface(acm->control);
}
	mutex_unlock(&acm->mutex);
}

static void acm_tty_cleanup(struct tty_struct *tty)
{