Skip to content

Commit 6b9935d

Browse files
kawasakimartinkpetersen
authored andcommitted
scsi: mpi3mr: Add missing spin_lock_init() for mrioc->trigger_lock
Commit fc44449 ("scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers") added the spinlock trigger_lock to the struct mpi3mr_ioc. However, spin_lock_init() call was not added for it, then the lock does not work as expected. Also, the kernel reports the message below when lockdep is enabled. INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? To fix the issue and to avoid the INFO message, add the missing spin_lock_init() call. Fixes: fc44449 ("scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers") Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Sathya Prakash Veerichetty <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent f874d72 commit 6b9935d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/mpi3mr/mpi3mr_os.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5234,6 +5234,7 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
52345234
spin_lock_init(&mrioc->watchdog_lock);
52355235
spin_lock_init(&mrioc->chain_buf_lock);
52365236
spin_lock_init(&mrioc->sas_node_lock);
5237+
spin_lock_init(&mrioc->trigger_lock);
52375238

52385239
INIT_LIST_HEAD(&mrioc->fwevt_list);
52395240
INIT_LIST_HEAD(&mrioc->tgtdev_list);

0 commit comments

Comments
 (0)