common/cnxk: fix freeing MCAM counter
authorSatheesh Paul <psatheesh@marvell.com>
Fri, 17 Sep 2021 04:37:46 +0000 (10:07 +0530)
committerJerin Jacob <jerinj@marvell.com>
Mon, 4 Oct 2021 15:43:07 +0000 (17:43 +0200)
commitd74d3744da6cf65e9d8daae2386c5bae39853022
tree714b284376295f9e4caaab00017e83cd63153300
parent137fbfc6b6711bddc05c32324db972801aad7366
common/cnxk: fix freeing MCAM counter

Upon MCAM allocation failure, free counters only if counters
were allocated earlier for the flow rule.

Fixes: f9af90807466 ("common/cnxk: add mcam utility API")
Cc: stable@dpdk.org
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_npc_mcam.c