]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
scsi: lpfc: fix missing spin_unlock on sql_list_lock
authorJames Smart <jsmart2021@gmail.com>
Sat, 4 Mar 2017 17:30:24 +0000 (09:30 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Mar 2017 04:04:22 +0000 (23:04 -0500)
commitd11f54b7d1d40463024be3b40ab7be2c8a84fa43
tree3ca62489bbc6e48313bdd480206ca581c65d9a0c
parent332ba3b5d6d27a60d445704ed7c88c7e9f958a30
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>
drivers/scsi/lpfc/lpfc_sli.c