From: Xiang Chen Date: Fri, 8 Dec 2017 17:16:32 +0000 (+0800) Subject: scsi: hisi_sas: initialize dq spinlock before use X-Git-Tag: v4.16-rc1~140^2~204 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=39bade0c9fb11e04945a5749e01e65a376e4eb02;p=linux.git 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 Signed-off-by: John Garry Signed-off-by: Martin K. Petersen --- 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;