diff options
author | Joe Perches <joe@perches.com> | 2014-08-08 17:24:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:29 -0400 |
commit | 440c734fefdabcf9caf4532e9bc51313cd0c546b (patch) | |
tree | 6f8a14948b9f3291e8790e75dbd6b84f4310c43e /drivers/net/ethernet/qlogic/netxen | |
parent | a2d0abc6aacf2ba9e76ffad60f1782aa10942bce (diff) |
qlogic: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Manish Chopra <manish.chopra@qlogic.com>
Cc: Sony Chacko <sony.chacko@qlogic.com>
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com>
Cc: Shahed Shaikh <shahed.shaikh@qlogic.com>
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Cc: Ron Mercer <ron.mercer@qlogic.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/ethernet/qlogic/netxen')
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c index 6f6be57f4690..b8d5270359cd 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | |||
@@ -129,14 +129,12 @@ netxen_get_minidump_template(struct netxen_adapter *adapter) | |||
129 | return NX_RCODE_INVALID_ARGS; | 129 | return NX_RCODE_INVALID_ARGS; |
130 | } | 130 | } |
131 | 131 | ||
132 | addr = pci_alloc_consistent(adapter->pdev, size, &md_template_addr); | 132 | addr = pci_zalloc_consistent(adapter->pdev, size, &md_template_addr); |
133 | |||
134 | if (!addr) { | 133 | if (!addr) { |
135 | dev_err(&adapter->pdev->dev, "Unable to allocate dmable memory for template.\n"); | 134 | dev_err(&adapter->pdev->dev, "Unable to allocate dmable memory for template.\n"); |
136 | return -ENOMEM; | 135 | return -ENOMEM; |
137 | } | 136 | } |
138 | 137 | ||
139 | memset(addr, 0, size); | ||
140 | memset(&cmd, 0, sizeof(cmd)); | 138 | memset(&cmd, 0, sizeof(cmd)); |
141 | memset(&cmd.rsp, 1, sizeof(struct _cdrp_cmd)); | 139 | memset(&cmd.rsp, 1, sizeof(struct _cdrp_cmd)); |
142 | cmd.req.cmd = NX_CDRP_CMD_GET_TEMP_HDR; | 140 | cmd.req.cmd = NX_CDRP_CMD_GET_TEMP_HDR; |