mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Cc: Simon Arlott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
c497e715f9
commit
eeafa64b7a
1 changed files with 2 additions and 1 deletions
|
|
@ -485,7 +485,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
|
|||
usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n",
|
||||
wbuflen, rbuflen);
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
goto err;
|
||||
}
|
||||
|
||||
mutex_lock(&instance->cm_serialize);
|
||||
|
|
@ -565,6 +565,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
|
|||
dbg("cm %#x", cm);
|
||||
fail:
|
||||
mutex_unlock(&instance->cm_serialize);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue