diff options
author | Joe Perches <joe@perches.com> | 2014-08-08 17:24:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:29 -0400 |
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 112799b131a9..22a04e37b70a 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, | |||
2038 | 2038 | ||
2039 | if (initial) { | 2039 | if (initial) { |
2040 | instance->hb_host_mem = | 2040 | instance->hb_host_mem = |
2041 | pci_alloc_consistent(instance->pdev, | 2041 | pci_zalloc_consistent(instance->pdev, |
2042 | sizeof(struct MR_CTRL_HB_HOST_MEM), | 2042 | sizeof(struct MR_CTRL_HB_HOST_MEM), |
2043 | &instance->hb_host_mem_h); | 2043 | &instance->hb_host_mem_h); |
2044 | if (!instance->hb_host_mem) { | 2044 | if (!instance->hb_host_mem) { |
2045 | printk(KERN_DEBUG "megasas: SR-IOV: Couldn't allocate" | 2045 | printk(KERN_DEBUG "megasas: SR-IOV: Couldn't allocate" |
2046 | " memory for heartbeat host memory for " | 2046 | " memory for heartbeat host memory for " |
@@ -2048,8 +2048,6 @@ int megasas_sriov_start_heartbeat(struct megasas_instance *instance, | |||
2048 | retval = -ENOMEM; | 2048 | retval = -ENOMEM; |
2049 | goto out; | 2049 | goto out; |
2050 | } | 2050 | } |
2051 | memset(instance->hb_host_mem, 0, | ||
2052 | sizeof(struct MR_CTRL_HB_HOST_MEM)); | ||
2053 | } | 2051 | } |
2054 | 2052 | ||
2055 | memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); | 2053 | memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); |