nvme: unlock mutex on failure

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id96bd06c61bc49d9ecbdb16f30804a7dda635771

Reviewed-on: https://review.gerrithub.io/434050
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
This commit is contained in:
Maciej Szwed 2018-11-20 12:51:59 +01:00 committed by Darek Stojaczyk
parent c1ce8db0df
commit dfff013c04

View File

@ -72,6 +72,7 @@ spdk_nvme_ocssd_ctrlr_cmd_geometry(struct spdk_nvme_ctrlr *ctrlr, uint32_t nsid,
req = nvme_allocate_request_user_copy(ctrlr->adminq, req = nvme_allocate_request_user_copy(ctrlr->adminq,
payload, payload_size, cb_fn, cb_arg, false); payload, payload_size, cb_fn, cb_arg, false);
if (req == NULL) { if (req == NULL) {
nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock);
return -ENOMEM; return -ENOMEM;
} }