mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
atl1e: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.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>
This commit is contained in:
parent
8c6a5dca88
commit
191182688a
1 changed files with 2 additions and 5 deletions
|
@ -831,17 +831,14 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
|
|||
/* real ring DMA buffer */
|
||||
|
||||
size = adapter->ring_size;
|
||||
adapter->ring_vir_addr = pci_alloc_consistent(pdev,
|
||||
adapter->ring_size, &adapter->ring_dma);
|
||||
|
||||
adapter->ring_vir_addr = pci_zalloc_consistent(pdev, adapter->ring_size,
|
||||
&adapter->ring_dma);
|
||||
if (adapter->ring_vir_addr == NULL) {
|
||||
netdev_err(adapter->netdev,
|
||||
"pci_alloc_consistent failed, size = D%d\n", size);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(adapter->ring_vir_addr, 0, adapter->ring_size);
|
||||
|
||||
rx_page_desc = rx_ring->rx_page_desc;
|
||||
|
||||
/* Init TPD Ring */
|
||||
|
|
Loading…
Reference in a new issue