From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id 27A878D96 for ; Wed, 19 Aug 2015 22:00:17 +0200 (CEST) Received: by pdrh1 with SMTP id h1so5155959pdr.0 for ; Wed, 19 Aug 2015 13:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=WLYvrzEWVvH+N38h+FBw6w2rs8dY8/iRNJtJOqbSXoU=; b=WEebacu50AWwn656+t2QklKWpsSCiQdSo6YSmOTT8tAc8HUL5csXWlM900yvnk0Obc /IyUZbOfPAILa2Kot/O8krXdLSoPU6iA87ne3RaSORZisApPhJO85f7MCFer+V1+uR0v H4YMOhhDTTWyf4H6mzxPgBgs1x9vb8gnoSS3udCSJiXylTeIG5s9OEEl4AA6DGRp/Ggr Baxg7LZCAnZz4gaThkqgT9qlXRCc8vv3fhhATofY6+VhEuwkDAonqC64Ab2rKpf8x2YU rIyD98Y2/EfW4E1+a9/UsJeSDNU1+P/HJtdeCKo6I1ADXECQO4BHuj3gU62vUB7kTy8o Ex1g== X-Received: by 10.70.140.168 with SMTP id rh8mr28532847pdb.19.1440014413440; Wed, 19 Aug 2015 13:00:13 -0700 (PDT) Received: from user-PC.hsd1.ca.comcast.net (c-24-4-155-27.hsd1.ca.comcast.net. [24.4.155.27]) by smtp.gmail.com with ESMTPSA id w6sm1795493pdn.46.2015.08.19.13.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Aug 2015 13:00:12 -0700 (PDT) From: Ravi Kerur To: dev@dpdk.org Date: Wed, 19 Aug 2015 13:00:07 -0700 Message-Id: <1440014407-3233-1-git-send-email-rkerur@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH v1] Return ENOMEM during mpipe_devinit failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2015 20:00:17 -0000 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 --- drivers/net/mpipe/mpipe_tilegx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 743feef..6e3e304 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" -- 1.9.1