From: Joe Perches Date: Thu, 26 Jun 2014 00:43:18 +0000 (+1000) Subject: enic: use pci_zalloc_consistent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c58ca38039aa0465bb3583e7fd7bc117729d369c;p=karo-tx-linux.git enic: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Cc: Christian Benvenuti Cc: Sujith Sankar Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Neel Patel Acked-by: David S. Miller Signed-off-by: Andrew Morton --- 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, 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);