summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-11-04 19:25:01 +0100
committerJames Bottomley <JBottomley@Parallels.com>2011-11-10 17:50:38 +0100
commit181a9d795ab763b03b15f73402691abde98d1803 (patch)
tree7bdcf7c1c4263999fb33b528b16a8fc2b56e4ca0 /drivers/scsi/mpt2sas
parent[SCSI] Silencing 'killing requests for dead queue' (diff)
downloadlinux-181a9d795ab763b03b15f73402691abde98d1803.tar.xz
linux-181a9d795ab763b03b15f73402691abde98d1803.zip
[SCSI] mpt2sas: add missing allocation.
There was supposed to be a kzalloc() here and the compiler complained about it. mpt2sas_scsih.c: In function ‘mpt2sas_scsih_reset_handler’: mpt2sas_scsih.c:2807:21: warning: ‘fw_event’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 8889b1babcac..4e041f6d808c 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2802,6 +2802,11 @@ _scsih_error_recovery_delete_devices(struct MPT2SAS_ADAPTER *ioc)
if (ioc->is_driver_loading)
return;
+
+ fw_event = kzalloc(sizeof(struct fw_event_work), GFP_ATOMIC);
+ if (!fw_event)
+ return;
+
fw_event->event = MPT2SAS_REMOVE_UNRESPONDING_DEVICES;
fw_event->ioc = ioc;
_scsih_fw_event_add(ioc, fw_event);