diff mbox series

[1/2] net/bnxt: remove unnecessary check

Message ID 20220927155902.29850-1-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Accepted
Delegated to: Ajit Khaparde
Headers show
Series [1/2] net/bnxt: remove unnecessary check | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Kalesh A P Sept. 27, 2022, 3:59 p.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

We are not invoking rte_eth_switch_domain_free currently owing to
an unnecessary check. This patch fixes that.

Fixes: e2895305a5b5 ("net/bnxt: fix resource cleanup")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ajit Khaparde Oct. 4, 2022, 3:58 a.m. UTC | #1
On Tue, Sep 27, 2022 at 9:00 AM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> We are not invoking rte_eth_switch_domain_free currently owing to
> an unnecessary check. This patch fixes that.
>
> Fixes: e2895305a5b5 ("net/bnxt: fix resource cleanup")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index e275d3a..84cf9a3 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -5977,8 +5977,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
>         bnxt_uninit_ctx_mem(bp);
>
>         bnxt_free_flow_stats_info(bp);
> -       if (bp->rep_info != NULL)
> -               bnxt_free_switch_domain(bp);
> +       bnxt_free_switch_domain(bp);
>         bnxt_free_rep_info(bp);
>         rte_free(bp->ptp_cfg);
>         bp->ptp_cfg = NULL;
> --
> 2.10.1
>
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e275d3a..84cf9a3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5977,8 +5977,7 @@  bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 	bnxt_uninit_ctx_mem(bp);
 
 	bnxt_free_flow_stats_info(bp);
-	if (bp->rep_info != NULL)
-		bnxt_free_switch_domain(bp);
+	bnxt_free_switch_domain(bp);
 	bnxt_free_rep_info(bp);
 	rte_free(bp->ptp_cfg);
 	bp->ptp_cfg = NULL;