diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-03-11 16:47:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-17 17:01:28 -0400 |
commit | eeafa64b7a4134da24d48ed944e48541f8171152 (patch) | |
tree | 72b750a2147ad0440995fca3fad25c01b3c07222 /drivers/usb | |
parent | c497e715f93d148d751c055401568684eea0bf6b (diff) |
USB: atm/cxacru, fix lock imbalance
We do not hold mutex in one place in cxacru_cm, but unlock it on fail path.
Fix this.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Simon Arlott <cxacru@fire.lp0.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/atm/cxacru.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 5ed4ae07bac1..6789089e2461 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c | |||
@@ -485,7 +485,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, | |||
485 | usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n", | 485 | usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n", |
486 | wbuflen, rbuflen); | 486 | wbuflen, rbuflen); |
487 | ret = -ENOMEM; | 487 | ret = -ENOMEM; |
488 | goto fail; | 488 | goto err; |
489 | } | 489 | } |
490 | 490 | ||
491 | mutex_lock(&instance->cm_serialize); | 491 | mutex_lock(&instance->cm_serialize); |
@@ -565,6 +565,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, | |||
565 | dbg("cm %#x", cm); | 565 | dbg("cm %#x", cm); |
566 | fail: | 566 | fail: |
567 | mutex_unlock(&instance->cm_serialize); | 567 | mutex_unlock(&instance->cm_serialize); |
568 | err: | ||
568 | return ret; | 569 | return ret; |
569 | } | 570 | } |
570 | 571 | ||