summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas
diff options
context:
space:
mode:
authorXiang Chen <chenxiang66@hisilicon.com>2017-12-09 01:16:32 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2017-12-14 21:25:02 -0500
commit39bade0c9fb11e04945a5749e01e65a376e4eb02 (patch)
tree4e14ea46dea0816055ebb22c5a5082f92f77ded5 /drivers/scsi/hisi_sas
parented123b6e474039483ffdb0a621184e3c3b4f9bce (diff)
downloadlinux-39bade0c9fb11e04945a5749e01e65a376e4eb02.tar.bz2
scsi: hisi_sas: initialize dq spinlock before use
It is required to initialize the dq spinlock before use, which was not being done, so fix it. This issue can be detected when CONFIG_DEBUG_SPINLOCK is enabled. Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 5f503cb09508..359ec52fc2fb 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1657,6 +1657,7 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost)
cq->hisi_hba = hisi_hba;
/* Delivery queue structure */
+ spin_lock_init(&dq->lock);
dq->id = i;
dq->hisi_hba = hisi_hba;