From: Kalesh AP <[email protected]>

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: [email protected]

Signed-off-by: Kalesh AP <[email protected]>
Reviewed-by: Ajit Khaparde <[email protected]>
Reviewed-by: Somnath Kotur <[email protected]>
---
 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

Reply via email to