mpipe: return error for init allocation failure
authorRavi Kerur <rkerur@gmail.com>
Wed, 19 Aug 2015 20:00:07 +0000 (13:00 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 24 Oct 2015 17:24:17 +0000 (19:24 +0200)
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 <rkerur@gmail.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Zhigang Lu <zlu@ezchip.com>
drivers/net/mpipe/mpipe_tilegx.c

index 743feef..6e3e304 100644 (file)
@@ -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"