diff options
author | Joe Perches <joe@perches.com> | 2014-08-08 14:24:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 15:57:29 -0700 |
commit | 7c845eb5e184977d9c7135ae20d012b59f8cc729 (patch) | |
tree | 71115a1f8b3528722917faf589171a4c690547ea /drivers/scsi/megaraid/megaraid_sas_base.c | |
parent | 8ac41b9dc719b4a5c65a2192988e8199278bb71a (diff) |
scsi: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Adam Radford <linuxraid@lsi.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Cc: Dario Ballabio <ballabio_dario@emc.com>
Cc: Michael Neuffer <mike@i-Connect.Net>
Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 112799b131a..22a04e37b70 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -2038,9 +2038,9 @@ int megasas_sriov_start_heartbeat(struct megasas_instance *instance, if (initial) { instance->hb_host_mem = - pci_alloc_consistent(instance->pdev, - sizeof(struct MR_CTRL_HB_HOST_MEM), - &instance->hb_host_mem_h); + pci_zalloc_consistent(instance->pdev, + sizeof(struct MR_CTRL_HB_HOST_MEM), + &instance->hb_host_mem_h); if (!instance->hb_host_mem) { printk(KERN_DEBUG "megasas: SR-IOV: Couldn't allocate" " memory for heartbeat host memory for " @@ -2048,8 +2048,6 @@ int megasas_sriov_start_heartbeat(struct megasas_instance *instance, retval = -ENOMEM; goto out; } - memset(instance->hb_host_mem, 0, - sizeof(struct MR_CTRL_HB_HOST_MEM)); } memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); |