aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-25 22:26:14 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-25 22:26:14 -0500
commit91e229bbad6524aabaac8717b2f559283670c37a (patch)
tree84a55e4ac2dcf23add97bd9fde3e9cb232c12b30 /drivers/usb/class/cdc-acm.c
parent6e5e93424dc66542c548dfaa3bfebe30d46d50dd (diff)
parentbfa274e2436fc7ef72ef51c878083647f1cfd429 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
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 bcc42136c93f..0147ea39340e 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)
496 otherwise it is scheduled, and with high data rates data can get lost. */ 496 otherwise it is scheduled, and with high data rates data can get lost. */
497 tty->low_latency = 1; 497 tty->low_latency = 1;
498 498
499 if (usb_autopm_get_interface(acm->control)) { 499 if (usb_autopm_get_interface(acm->control) < 0)
500 mutex_unlock(&open_mutex); 500 goto early_bail;
501 return -EIO;
502 }
503 501
504 mutex_lock(&acm->mutex); 502 mutex_lock(&acm->mutex);
505 mutex_unlock(&open_mutex);
506 if (acm->used++) { 503 if (acm->used++) {
507 usb_autopm_put_interface(acm->control); 504 usb_autopm_put_interface(acm->control);
508 goto done; 505 goto done;
@@ -536,6 +533,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
536done: 533done:
537err_out: 534err_out:
538 mutex_unlock(&acm->mutex); 535 mutex_unlock(&acm->mutex);
536 mutex_unlock(&open_mutex);
539 return rv; 537 return rv;
540 538
541full_bailout: 539full_bailout:
@@ -544,6 +542,8 @@ bail_out:
544 usb_autopm_put_interface(acm->control); 542 usb_autopm_put_interface(acm->control);
545 acm->used--; 543 acm->used--;
546 mutex_unlock(&acm->mutex); 544 mutex_unlock(&acm->mutex);
545early_bail:
546 mutex_unlock(&open_mutex);
547 return -EIO; 547 return -EIO;
548} 548}
549 549