]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: fix missing spin_unlock on sql_list_lock
authorColin Ian King <colin.king@canonical.com>
Sat, 4 Mar 2017 17:30:24 +0000 (09:30 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 14 Jul 2017 00:11:52 +0000 (17:11 -0700)
commit80c55d6b7525d90ff6951b42595ffcdc29c18b66
treea933db5f4fe7712cf0df95fc46833a6ac517bb68
parent75cc2d6f6721fe21bf9a756fddc439d064762ac4
scsi: lpfc: fix missing spin_unlock on sql_list_lock

Orabug: 26439257

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>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c