scsi: target: iscsi: cxgbit: add missing spin_lock_init()
authorVarun Prakash <varun@chelsio.com>
Fri, 9 Nov 2018 15:29:46 +0000 (20:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 09:00:58 +0000 (10:00 +0100)
[ Upstream commit 9e6371d3c6913ff1707fb2c0274c9925f7aaef80 ]

Add missing spin_lock_init() for cdev->np_lock.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/target/iscsi/cxgbit/cxgbit_main.c

index 4fd775ace541a978b258fc8f3b26f3c8108c23f3..6340e2e7ffbe590cf2634ea68a64215795143010 100644 (file)
@@ -58,6 +58,7 @@ static void *cxgbit_uld_add(const struct cxgb4_lld_info *lldi)
                return ERR_PTR(-ENOMEM);
 
        kref_init(&cdev->kref);
+       spin_lock_init(&cdev->np_lock);
 
        cdev->lldi = *lldi;