In __bnxt_hwrm_func_qcaps, when memory allocations fails
driver is not releasing the hwrm lock. This patch fixes it
by calling hwrm_unlock in that error case.
Fixes:
b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
sizeof(bp->pf->vf_info[0]) * new_max_vfs, 0);
if (bp->pf->vf_info == NULL) {
PMD_DRV_LOG(ERR, "Alloc vf info fail\n");
+ HWRM_UNLOCK();
return -ENOMEM;
}
bp->pf->max_vfs = new_max_vfs;