[18/18] net/bnxt: call bnxt_uninit_locks from bnxt_uninit_resources

Message ID 20191024055913.28817-19-somnath.kotur@broadcom.com (mailing list archive)
State Superseded, archived
Headers
Series bnxt patchset with bug fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Somnath Kotur Oct. 24, 2019, 5:59 a.m. UTC
  From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>

Currently, bnxt_uninit_locks is called inside bnxt_dev_uninit. However,
the more appropriate place to call it is inside bnxt_uninit_resources.
This is more logical, as all the resources uninitialization is happening
inside bnxt_uninit_resources.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e7ec99e..744f715 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4772,6 +4772,7 @@  bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 		}
 	}
 
+	bnxt_uninit_locks(bp);
 	rte_free(bp->ptp_cfg);
 	bp->ptp_cfg = NULL;
 	return rc;
@@ -4813,8 +4814,6 @@  bnxt_dev_uninit(struct rte_eth_dev *eth_dev)
 	eth_dev->rx_pkt_burst = NULL;
 	eth_dev->tx_pkt_burst = NULL;
 
-	bnxt_uninit_locks(bp);
-
 	return rc;
 }