summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c22a41)
raw | patch | inline | side by side (parent: 7c22a41)
author | Hao Zhang <hzhang@ti.com> | |
Fri, 23 Feb 2018 14:22:12 +0000 (09:22 -0500) | ||
committer | Hao Zhang <hzhang@ti.com> | |
Fri, 23 Feb 2018 14:22:12 +0000 (09:22 -0500) |
dmaChannelHwEvtMap is an array of size 2, lCh should be checked before
referencing drvObject->gblCfgParams.dmaChannelHwEvtMap[]
Signed-off-by: Hao Zhang <hzhang@ti.com>
referencing drvObject->gblCfgParams.dmaChannelHwEvtMap[]
Signed-off-by: Hao Zhang <hzhang@ti.com>
packages/ti/sdo/edma3/drv/src/edma3_drv_basic.c | patch | blob | history |
diff --git a/packages/ti/sdo/edma3/drv/src/edma3_drv_basic.c b/packages/ti/sdo/edma3/drv/src/edma3_drv_basic.c
index 2a6ab6e155c0a32f2f4645c8272e49596810e663..107097364398e08baf97525b0e22c35fcac05d4d 100755 (executable)
result = EDMA3_DRV_E_INVALID_PARAM;
}
+ if (lCh < EDMA3_MAX_DMA_CH)
+ {
/* Trigger type is Event */
if ((EDMA3_DRV_TRIG_MODE_EVENT == trigMode)
&& ((drvObject->gblCfgParams.dmaChannelHwEvtMap [lCh/32U]
/* Channel was not mapped to any Hw Event. */
result = EDMA3_DRV_E_INVALID_PARAM;
}
+ }
#endif
}
result = EDMA3_DRV_E_INVALID_PARAM;
}
+ if (lCh < EDMA3_MAX_DMA_CH)
+ {
/* Trigger type is Event */
if ((EDMA3_DRV_TRIG_MODE_EVENT == trigMode)
&& ((drvObject->gblCfgParams.dmaChannelHwEvtMap [lCh/32U]
/* Channel was not mapped to any Hw Event. */
result = EDMA3_DRV_E_INVALID_PARAM;
}
+ }
#endif
}
result = EDMA3_DRV_E_INVALID_PARAM;
}
+ if (lCh < EDMA3_MAX_DMA_CH)
+ {
/* Trigger type is Event */
if ((EDMA3_DRV_TRIG_MODE_EVENT == trigMode)
&& ((drvObject->gblCfgParams.dmaChannelHwEvtMap [lCh/32U]
/* Channel was not mapped to any Hw Event. */
result = EDMA3_DRV_E_INVALID_PARAM;
}
+ }
#endif
}