From: Ravi Kerur Date: Wed, 19 Aug 2015 20:00:07 +0000 (-0700) Subject: mpipe: return error for init allocation failure X-Git-Tag: spdx-start~8368 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e83982c4b37dde36c3d3be9561783cac92396a4a;p=dpdk.git mpipe: return error for init allocation failure In function rte_pmd_mpipe_devinit, if rte_eth_dev_allocate fails return error which is inline with other drivers. Signed-off-by: Ravi Kerur Acked-by: Tetsuya Mukawa Acked-by: Zhigang Lu --- diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 743feefc85..6e3e3048ae 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -1582,6 +1582,7 @@ rte_pmd_mpipe_devinit(const char *ifname, if (!eth_dev) { RTE_LOG(ERR, PMD, "%s: Failed to allocate device.\n", ifname); rte_free(priv); + return -ENOMEM; } RTE_LOG(INFO, PMD, "%s: Initialized mpipe device"