diff options
author | Michael Chan <michael.chan@broadcom.com> | 2023-11-21 02:43:54 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-22 04:32:47 +0300 |
commit | e50dc4c2206e3eeed10c799db37bb51bc545f28a (patch) | |
tree | 3a81a59f1a2c3278f79b4d399cb12134b485c188 /drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | |
parent | aa8460bacf49e06d5024bb26c591b5fda91ca6c1 (diff) | |
download | linux-e50dc4c2206e3eeed10c799db37bb51bc545f28a.tar.xz |
bnxt_en: Free bp->ctx inside bnxt_free_ctx_mem()
We always free bp->ctx right after calling bnxt_free_ctx_mem(), so just
free it at the end of that function to make things simpler.
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231120234405.194542-3-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index f302dac56599..10b842539b08 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -469,8 +469,6 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change, } bnxt_cancel_reservations(bp, false); bnxt_free_ctx_mem(bp); - kfree(bp->ctx); - bp->ctx = NULL; break; } case DEVLINK_RELOAD_ACTION_FW_ACTIVATE: { |