提交 fe5fb42d 编写于 作者: J John Garry 提交者: Martin K. Petersen

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: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 abaf75dd
......@@ -806,8 +806,10 @@ slot_index_alloc_quirk_v2_hw(struct hisi_hba *hisi_hba,
while (1) {
start = find_next_zero_bit(bitmap,
hisi_hba->slot_index_count, start);
if (start >= end)
if (start >= end) {
spin_unlock_irqrestore(&hisi_hba->lock, flags);
return -SAS_QUEUE_FULL;
}
/*
* SAS IPTT bit0 should be 1, and SATA IPTT bit0 should be 0.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册