Release global SME lock before return due to error
In some of the APIs sme global lock is not released before return
in case of error.release the lock.
Change-Id: Id2923ec7824dcff8d4740d55c2361f4e605d3f86
CRs-fixed: 430950
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 8ff65d9..748f2c6 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -3729,6 +3729,7 @@
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
+ sme_ReleaseGlobalLock( &pMac->sme );
return eHAL_STATUS_FAILURE;
}
@@ -4146,6 +4147,7 @@
if ( !HAL_STATUS_SUCCESS(status) )
{
smsLog(pMac, LOGE, " csrChangeCountryCode: failed to allocate mem for req \n");
+ sme_ReleaseGlobalLock( &pMac->sme );
return status;
}
@@ -4904,7 +4906,10 @@
*pOemDataReqID = lOemDataReqId;
}
else
- return eHAL_STATUS_FAILURE;
+ {
+ sme_ReleaseGlobalLock( &pMac->sme );
+ return eHAL_STATUS_FAILURE;
+ }
status = oemData_OemDataReq(hHal, sessionId, pOemDataReqConfig, pOemDataReqID, callback, pContext);
@@ -5370,6 +5375,7 @@
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
+ sme_ReleaseGlobalLock( &pMac->sme );
return eHAL_STATUS_FAILURE;
}
@@ -5427,6 +5433,7 @@
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
+ sme_ReleaseGlobalLock( &pMac->sme );
return eHAL_STATUS_FAILURE;
}
@@ -6583,6 +6590,7 @@
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
+ sme_ReleaseGlobalLock( &pMac->sme );
return eHAL_STATUS_FAILURE;
}
@@ -6631,6 +6639,7 @@
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: Not able to allocate memory for sme_SetTmLevel", __func__);
+ sme_ReleaseGlobalLock( &pMac->sme );
return eHAL_STATUS_FAILURE;
}