]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/edma3_lld.git/commitdiff
PRSDK-3363 Fixed Klocwork issue on EDMA Examples
authorSinthu Raja M <x0257345@ti.com>
Tue, 27 Feb 2018 16:57:28 +0000 (22:27 +0530)
committerSinthu Raja M <x0257345@ti.com>
Tue, 27 Feb 2018 16:57:28 +0000 (22:27 +0530)
  Klocwork error fix for EDMA3 examples

examples/edma3_driver/src/main.c

index 37796a698bcec45a6c773bb79dab03d476e2a152..30062047f3f2afcc136d3fbe3e04df2acdb0083f 100644 (file)
@@ -333,38 +333,39 @@ void echo()
     if (hndEdma)
     {
         printf("edma3init() Passed\n");
-    }
-    else
-    {
-        printf("edma3init() Failed, error code: %d\n", (int)edmaResult);
-    }
 
-    /* User request PaRAMId test */
-    if (edmaResult == EDMA3_DRV_SOK)
-    {
-        edmaResult = edma3_test_user_req_paRAMId(hndEdma, edmaInstance,
+        /* User request PaRAMId test */
+        if (edmaResult == EDMA3_DRV_SOK)
+        {
+            edmaResult = edma3_test_user_req_paRAMId(hndEdma, edmaInstance,
                       MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
-    }
+        }
 
-    if (edmaResult == EDMA3_DRV_SOK)
-    {
-        printf ("edma3_test_user_req_paRAMId Passed\r\n");
-    }
-    else
-    {
-        printf ("edma3_test_user_req_paRAMId Failed\r\n");
-    }
+        if (edmaResult == EDMA3_DRV_SOK)
+        {
+            printf ("edma3_test_user_req_paRAMId Passed\r\n");
+        }
+        else
+        {
+            printf ("edma3_test_user_req_paRAMId Failed\r\n");
+        }
 
-    /*EDMA3 deinitialization */
-    edmaResult = edma3deinit(edmaInstance, hndEdma);
-    if (edmaResult != EDMA3_DRV_SOK)
-    {
-        printf("edma3deinit() Failed, error code: %d\n", (int)edmaResult);
+        /*EDMA3 deinitialization */
+        edmaResult = edma3deinit(edmaInstance, hndEdma);
+        if (edmaResult != EDMA3_DRV_SOK)
+        {
+            printf("edma3deinit() Failed, error code: %d\n", (int)edmaResult);
+        }
+        else
+        {
+            printf("edma3deinit() Passed\n");
+        }
     }
     else
     {
-        printf("edma3deinit() Passed\n");
+        printf("edma3init() Failed, error code: %d\n", (int)edmaResult);
     }
+
     /* Start the Heart Beat Print */
     tskHeartBit();