enic: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Fri, 8 Aug 2014 21:24:27 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:29 +0000 (15:57 -0700)
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>
drivers/net/ethernet/cisco/enic/vnic_dev.c

index 5abc496bcf29e64d3106b6451739dbdda6a4e7cf..37472ce4fac310a933a1f332a5df451a1cdbcc5d 100644 (file)
@@ -432,14 +432,12 @@ int vnic_dev_fw_info(struct vnic_dev *vdev,
        int err = 0;
 
        if (!vdev->fw_info) {
-               vdev->fw_info = pci_alloc_consistent(vdev->pdev,
-                       sizeof(struct vnic_devcmd_fw_info),
-                       &vdev->fw_info_pa);
+               vdev->fw_info = pci_zalloc_consistent(vdev->pdev,
+                                                     sizeof(struct vnic_devcmd_fw_info),
+                                                     &vdev->fw_info_pa);
                if (!vdev->fw_info)
                        return -ENOMEM;
 
-               memset(vdev->fw_info, 0, sizeof(struct vnic_devcmd_fw_info));
-
                a0 = vdev->fw_info_pa;
                a1 = sizeof(struct vnic_devcmd_fw_info);