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

Commit 94d4c891 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: cdc-acm: clean up open error handling



No need to kill ctrl urb on errors as this is done later during close.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dab54c9f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)

	if (0 > acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS) &&
	    (acm->ctrl_caps & USB_CDC_CAP_LINE))
		goto full_bailout;
		goto bail_out;

	usb_autopm_put_interface(acm->control);

@@ -592,8 +592,6 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
	mutex_unlock(&open_mutex);
	return rv;

full_bailout:
	usb_kill_urb(acm->ctrlurb);
bail_out:
	acm->port.count--;
	mutex_unlock(&acm->mutex);