qcacld-3.0: Release spinlock before returning from error

While freeing ROC request nodes from the linked list a spinlock is
acquired. But it is not released if the API to remove node returns
failure. This will end up in a deadlock.

Release spinlock before returning from error.

Change-Id: I30281cc358b4827e59325554859c3dcffe6292b0
CRs-Fixed: 2042713
This commit is contained in:
Nachiket Kukade 2017-05-08 16:12:02 +05:30 • committed by snandini
commit d45ab8c7c3

View file

@ -5362,8 +5362,8 @@ static void hdd_destroy_roc_req_q(hdd_context_t *hdd_ctx)
(qdf_list_node_t **) &hdd_roc_req);
if (QDF_STATUS_SUCCESS != status) {
hdd_debug("unable to remove roc element from list in %s",
__func__);
qdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock);
hdd_debug("unable to remove roc element from list");
QDF_ASSERT(0);
return;
}