Skip to content

Commit

Permalink
irda: 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: Samuel Ortiz <[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 440c734 commit 38537b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/irda/vlsi_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,13 @@ static int vlsi_create_hwif(vlsi_irda_dev_t *idev)
idev->virtaddr = NULL;
idev->busaddr = 0;

ringarea = pci_alloc_consistent(idev->pdev, HW_RING_AREA_SIZE, &idev->busaddr);
ringarea = pci_zalloc_consistent(idev->pdev, HW_RING_AREA_SIZE,
&idev->busaddr);
if (!ringarea) {
IRDA_ERROR("%s: insufficient memory for descriptor rings\n",
__func__);
goto out;
}
memset(ringarea, 0, HW_RING_AREA_SIZE);

hwmap = (struct ring_descr_hw *)ringarea;
idev->rx_ring = vlsi_alloc_ring(idev->pdev, hwmap, ringsize[1],
Expand Down

0 comments on commit 38537b7

Please sign in to comment.