提交 87f44b4e 编写于 作者: J Joe Perches 提交者: Linus Torvalds

enic: use pci_zalloc_consistent

Remove the now unnecessary memset too.
Signed-off-by: NJoe 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: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 19118268
......@@ -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,
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册