aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 17:24:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:29 -0400
commit87f44b4e282a419fe82e9625ea6d3f35f614381f (patch)
tree8ccd01e85df3c8ef0382a02b3e763d1d63d7c884 /drivers/net
parent191182688a3303f70ed358f3b0029110d74dec5a (diff)
enic: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Neel Patel <neepatel@cisco.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')
-rw-r--r--drivers/net/ethernet/cisco/enic/vnic_dev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/cisco/enic/vnic_dev.c b/drivers/net/ethernet/cisco/enic/vnic_dev.c
index 5abc496bcf29..37472ce4fac3 100644
--- a/drivers/net/ethernet/cisco/enic/vnic_dev.c
+++ b/drivers/net/ethernet/cisco/enic/vnic_dev.c
@@ -432,14 +432,12 @@ int vnic_dev_fw_info(struct vnic_dev *vdev,
432 int err = 0; 432 int err = 0;
433 433
434 if (!vdev->fw_info) { 434 if (!vdev->fw_info) {
435 vdev->fw_info = pci_alloc_consistent(vdev->pdev, 435 vdev->fw_info = pci_zalloc_consistent(vdev->pdev,
436 sizeof(struct vnic_devcmd_fw_info), 436 sizeof(struct vnic_devcmd_fw_info),
437 &vdev->fw_info_pa); 437 &vdev->fw_info_pa);
438 if (!vdev->fw_info) 438 if (!vdev->fw_info)
439 return -ENOMEM; 439 return -ENOMEM;
440 440
441 memset(vdev->fw_info, 0, sizeof(struct vnic_devcmd_fw_info));
442
443 a0 = vdev->fw_info_pa; 441 a0 = vdev->fw_info_pa;
444 a1 = sizeof(struct vnic_devcmd_fw_info); 442 a1 = sizeof(struct vnic_devcmd_fw_info);
445 443