net/bnxt: release HWRM lock in error
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Tue, 17 Nov 2020 07:10:24 +0000 (12:40 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:05 +0000 (16:03 +0100)
commitec0a96819d35070276f350c2488203e7ab72aed4
tree7788d61e78b0d9f2e85381d56bfc4044cd91bc67
parent6a5be38da6257f12c6a140f9457a7b22164c378c
net/bnxt: release HWRM lock in error

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>
drivers/net/bnxt/bnxt_hwrm.c