net/ark: fix return code not checked
authorJohn Miller <john.miller@atomicrules.com>
Tue, 16 May 2017 16:14:16 +0000 (12:14 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:25 +0000 (10:41 +0100)
Coverity issue: 144514
Fixes: 727b3fe292bc ("net/ark: integrate PMD")
Cc: stable@dpdk.org
Signed-off-by: John Miller <john.miller@atomicrules.com>
drivers/net/ark/ark_ethdev.c

index 5c45038..07b7ddc 100644 (file)
@@ -588,7 +588,11 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
                /* Delay packet generatpr start allow the hardware to be ready
                 * This is only used for sanity checking with internal generator
                 */
-               pthread_create(&thread, NULL, delay_pg_start, ark);
+               if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
+                       PMD_DRV_LOG(ERR, "Could not create pktgen "
+                                   "starter thread\n");
+                       return -1;
+               }
        }
 
        if (ark->user_ext.dev_start)