mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 04:46:46 +07:00
scsi: lpfc: fix missing spin_unlock on sql_list_lock
From: Colin Ian King <colin.king@canonical.com> In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out of the while loop and the exit path will then unlock and return NULL as was the original intention. Detected by CoverityScan, CID#1411635 ("Missing unlock") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
332ba3b5d6
commit
d11f54b7d1
@ -952,7 +952,7 @@ __lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
|
|||||||
start_sglq = sglq;
|
start_sglq = sglq;
|
||||||
while (!found) {
|
while (!found) {
|
||||||
if (!sglq)
|
if (!sglq)
|
||||||
return NULL;
|
break;
|
||||||
if (ndlp && ndlp->active_rrqs_xri_bitmap &&
|
if (ndlp && ndlp->active_rrqs_xri_bitmap &&
|
||||||
test_bit(sglq->sli4_lxritag,
|
test_bit(sglq->sli4_lxritag,
|
||||||
ndlp->active_rrqs_xri_bitmap)) {
|
ndlp->active_rrqs_xri_bitmap)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user