summaryrefslogtreecommitdiff
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-22 00:20:22 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-22 00:20:22 (GMT)
commitc6b083466818e674d479cfeb847061a57658bcba (patch)
treec7cf12be0eb0a742dbb543248c0906f5de15fefb /drivers/usb/class/cdc-acm.c
parent5d637c4a5146f803a872275c139fc11914056d74 (diff)
parentb5937a415fc0387c18c40d618c7e98d1e2f65b42 (diff)
downloadlinux-c6b083466818e674d479cfeb847061a57658bcba.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (23 commits) ehci-fsl: add PPC_MPC837x to default y USB: POWERPC: ehci: fix ppc build USB: usb-storage: don't access beyond the end of the sg buffer USB: quirks and unusual_devs entry for Actions flash drive USB: usb-storage: unusual_devs entry for Oracom MP3 player USB: serial: move zte MF330 from sierra to option USB: add new vernier product id to ldusb.c USB: gadget: queue usb USB_CDC_GET_ENCAPSULATED_RESPONSE message USB: Add another Novatel U727 ID to the device table for usbserial USB: storage: Nikon D80 new FW still needs Fixup USB: usb-storage: don't clear-halt when Get-Max-LUN stalls USB: option: Added vendor id for Dell 5720 broadband modem USB: option: Add Kyocera KPC680 ids USB: quirks for known quirky audio devices USB: fix previous sparse fix which was incorrect USB: fix error handling in trancevibrator USB: g_printer, fix empty if statement USB: ehci-fsl: mpc834x config symbol is PPC_MPC834x, not MPC834x USB: fix usb open suspend race in cdc-acm USB: usb: yet another Dell wireless CDMA/EVDO modem ...
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index bcc4213..0147ea3 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -496,13 +496,10 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
otherwise it is scheduled, and with high data rates data can get lost. */
tty->low_latency = 1;
- if (usb_autopm_get_interface(acm->control)) {
- mutex_unlock(&open_mutex);
- return -EIO;
- }
+ if (usb_autopm_get_interface(acm->control) < 0)
+ goto early_bail;
mutex_lock(&acm->mutex);
- mutex_unlock(&open_mutex);
if (acm->used++) {
usb_autopm_put_interface(acm->control);
goto done;
@@ -536,6 +533,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
done:
err_out:
mutex_unlock(&acm->mutex);
+ mutex_unlock(&open_mutex);
return rv;
full_bailout:
@@ -544,6 +542,8 @@ bail_out:
usb_autopm_put_interface(acm->control);
acm->used--;
mutex_unlock(&acm->mutex);
+early_bail:
+ mutex_unlock(&open_mutex);
return -EIO;
}