mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -952,7 +952,7 @@ __lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
|
|||
start_sglq = sglq;
|
||||
while (!found) {
|
||||
if (!sglq)
|
||||
return NULL;
|
||||
break;
|
||||
if (ndlp && ndlp->active_rrqs_xri_bitmap &&
|
||||
test_bit(sglq->sli4_lxritag,
|
||||
ndlp->active_rrqs_xri_bitmap)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue