Skip to content

Commit

Permalink
enic: use pci_zalloc_consistent
Browse files Browse the repository at this point in the history
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <[email protected]>
Cc: Christian Benvenuti <[email protected]>
Cc: Sujith Sankar <[email protected]>
Cc: Govindarajulu Varadarajan <[email protected]>
Cc: Neel Patel <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Aug 8, 2014
1 parent 1911826 commit 87f44b4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/net/ethernet/cisco/enic/vnic_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 87f44b4

Please sign in to comment.