misrac fix 2 for 4.2.0 (PRSDK-3354)
[keystone-rtos/edma3_lld.git] / packages / ti / sdo / edma3 / rm / src / edma3resmgr.c
index 98dc8cb18195fc5b8cd0cf0c8e5a1628a2becb70..78c0cdce2e4f6014d2cf5e7b71a65ce597eacdf8 100755 (executable)
@@ -1728,7 +1728,7 @@ EDMA3_RM_Result EDMA3_RM_freeResource(EDMA3_RM_Handle hEdmaResMgr,
                     {
                     case EDMA3_RM_RES_DMA_CHANNEL :
                         {
-                        if (resId < rmObj->gblCfgParams.numDmaChannels)
+                        if ((resId < rmObj->gblCfgParams.numDmaChannels) && ((resId/32U) < 2))
                             {
                             if (((rmInstance->initParam.rmInstInitConfig->ownDmaChannels [resId/32U]) & (resIdSet))!=FALSE)
                                 {