drivers:net: Remove dma_alloc_coherent OOM messages
I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
68c45a2da3
commit
d0320f7500
@@ -386,20 +386,16 @@ static int mace_open(struct net_device *dev)
|
||||
/* Allocate the DMA ring buffers */
|
||||
|
||||
mp->tx_ring = dma_alloc_coherent(mp->device,
|
||||
N_TX_RING * MACE_BUFF_SIZE,
|
||||
&mp->tx_ring_phys, GFP_KERNEL);
|
||||
if (mp->tx_ring == NULL) {
|
||||
printk(KERN_ERR "%s: unable to allocate DMA tx buffers\n", dev->name);
|
||||
N_TX_RING * MACE_BUFF_SIZE,
|
||||
&mp->tx_ring_phys, GFP_KERNEL);
|
||||
if (mp->tx_ring == NULL)
|
||||
goto out1;
|
||||
}
|
||||
|
||||
mp->rx_ring = dma_alloc_coherent(mp->device,
|
||||
N_RX_RING * MACE_BUFF_SIZE,
|
||||
&mp->rx_ring_phys, GFP_KERNEL);
|
||||
if (mp->rx_ring == NULL) {
|
||||
printk(KERN_ERR "%s: unable to allocate DMA rx buffers\n", dev->name);
|
||||
N_RX_RING * MACE_BUFF_SIZE,
|
||||
&mp->rx_ring_phys, GFP_KERNEL);
|
||||
if (mp->rx_ring == NULL)
|
||||
goto out2;
|
||||
}
|
||||
|
||||
mace_dma_off(dev);
|
||||
|
||||
|
Reference in New Issue
Block a user