Skip to content
Snippets Groups Projects
Commit fe5fb42d authored by John Garry's avatar John Garry Committed by Martin K. Petersen
Browse files

scsi: hisi_sas: Fix spin lock management in slot_index_alloc_quirk_v2_hw()


Currently a spin_unlock_irqrestore() call is missing on the error path,
so add it.

Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent abaf75dd
No related branches found
No related tags found
No related merge requests found
...@@ -806,8 +806,10 @@ slot_index_alloc_quirk_v2_hw(struct hisi_hba *hisi_hba, ...@@ -806,8 +806,10 @@ slot_index_alloc_quirk_v2_hw(struct hisi_hba *hisi_hba,
while (1) { while (1) {
start = find_next_zero_bit(bitmap, start = find_next_zero_bit(bitmap,
hisi_hba->slot_index_count, start); hisi_hba->slot_index_count, start);
if (start >= end) if (start >= end) {
spin_unlock_irqrestore(&hisi_hba->lock, flags);
return -SAS_QUEUE_FULL; return -SAS_QUEUE_FULL;
}
/* /*
* SAS IPTT bit0 should be 1, and SATA IPTT bit0 should be 0. * SAS IPTT bit0 should be 1, and SATA IPTT bit0 should be 0.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment