From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 3417CAABB for ; Sat, 10 Mar 2018 23:49:56 +0100 (CET) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w2AMnpqU014071; Sat, 10 Mar 2018 14:49:52 -0800 From: Rahul Lakkireddy To: dev@dpdk.org Cc: kumaras@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com Date: Sun, 11 Mar 2018 04:18:28 +0530 Message-Id: <7d9ab1f90260a01b7ea021579a57c2a044748b33.1520720053.git.rahul.lakkireddy@chelsio.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 10/13] cxgbe: fix check to close other ports properly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 22:49:56 -0000 Fixes: 084b35314ff2 ("net/cxgbe: rework ethdev device allocation") Signed-off-by: Rahul Lakkireddy Signed-off-by: Kumar Sanghvi --- drivers/net/cxgbe/cxgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 882bcb7ef..b3b2b006a 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -1246,7 +1246,7 @@ void cxgbe_close(struct adapter *adapter) adapter->pf, 0, pi->viid); rte_free(pi->eth_dev->data->mac_addrs); /* Skip first port since it'll be freed by DPDK stack */ - if (!i) { + if (i) { rte_free(pi->eth_dev->data->dev_private); rte_eth_dev_release_port(pi->eth_dev); } -- 2.14.1