Fix for SDOCM00112751. Changed instance validity
authorPragat Chaudhari <pragatc@ti.com>
Tue, 26 Aug 2014 14:37:04 +0000 (10:37 -0400)
committerPragat Chaudhari <pragatc@ti.com>
Tue, 26 Aug 2014 14:37:04 +0000 (10:37 -0400)
check so that value of TCP3D_DRV_MAX_NUM_INSTANCES
is not a valid value. (Instance numbers are counted
from 0 to TCP3D_DRV_MAX_NUM_INSTANCES).

src/tcp3d_drv.c

index 39ad454b8c24881d41df5b7452cda186be0e150a..097ee454422dbb72d51742ce843400fbe2850b6f 100644 (file)
@@ -214,7 +214,7 @@ Tcp3d_Result Tcp3d_init( IN  Tcp3d_MemBuffer     bufs[],
     CSL_Tcp3d_cfgRegs       *tcp3dCfgRegs;\r
 \r
     /* Check for valid instance number */\r
-    if ( drvInitParams->instNum > TCP3D_DRV_MAX_NUM_INSTANCES )\r
+    if ( drvInitParams->instNum >= TCP3D_DRV_MAX_NUM_INSTANCES )\r
     {\r
         /* Return error */\r
         tcp3dResult = TCP3D_DRV_INVALID_INSTANCE_NUMBER;\r