From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raslan Darawsheh Subject: [PATCH v2 2/2] net/mlx5: free eth dev port in case of error Date: Mon, 7 May 2018 18:10:33 +0300 Message-ID: <1525705833-8573-2-git-send-email-rasland@mellanox.com> References: <1525705833-8573-1-git-send-email-rasland@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org, thomas@monjalon.net, ophirmu@mellanox.com, rasland@mellanox.com To: shahafs@mellanox.com Return-path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0087.outbound.protection.outlook.com [104.47.0.87]) by dpdk.org (Postfix) with ESMTP id 38AA83237 for ; Mon, 7 May 2018 17:10:49 +0200 (CEST) In-Reply-To: <1525705833-8573-1-git-send-email-rasland@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If something went wrong in mlx5 pci prop need to free the eth_dev that was previously allocated during the port setup. Signed-off-by: Raslan Darawsheh --- v2 changes: Reword the commit log. --- --- drivers/net/mlx5/mlx5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3831e3d..bffe90f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1063,6 +1063,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, claim_zero(mlx5_glue->dealloc_pd(pd)); if (ctx) claim_zero(mlx5_glue->close_device(ctx)); + if (eth_dev) + rte_eth_dev_release_port(eth_dev); break; } /* -- 2.7.4