Skip to content

Commit

Permalink
USB: cdc-acm: clean up open error handling
Browse files Browse the repository at this point in the history
No need to kill ctrl urb on errors as this is done later during close.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Apr 13, 2011
1 parent dab54c9 commit 94d4c89
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down

0 comments on commit 94d4c89

Please sign in to comment.