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
@@ -202,13 +202,13 @@ static int macsonic_init(struct net_device *dev)
|
||||
|
||||
/* Allocate the entire chunk of memory for the descriptors.
|
||||
Note that this cannot cross a 64K boundary. */
|
||||
if ((lp->descriptors = dma_alloc_coherent(lp->device,
|
||||
SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
|
||||
&lp->descriptors_laddr, GFP_KERNEL)) == NULL) {
|
||||
printk(KERN_ERR "%s: couldn't alloc DMA memory for descriptors.\n",
|
||||
dev_name(lp->device));
|
||||
lp->descriptors = dma_alloc_coherent(lp->device,
|
||||
SIZEOF_SONIC_DESC *
|
||||
SONIC_BUS_SCALE(lp->dma_bitmode),
|
||||
&lp->descriptors_laddr,
|
||||
GFP_KERNEL);
|
||||
if (lp->descriptors == NULL)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Now set up the pointers to point to the appropriate places */
|
||||
lp->cda = lp->descriptors;
|
||||
|
Reference in New Issue
Block a user