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:

gecommit door
David S. Miller

bovenliggende
68c45a2da3
commit
d0320f7500
@@ -1071,11 +1071,9 @@ static int dfx_driver_init(struct net_device *dev, const char *print_name,
|
||||
bp->kmalloced = top_v = dma_alloc_coherent(bp->bus_dev, alloc_size,
|
||||
&bp->kmalloced_dma,
|
||||
GFP_ATOMIC);
|
||||
if (top_v == NULL) {
|
||||
printk("%s: Could not allocate memory for host buffers "
|
||||
"and structures!\n", print_name);
|
||||
if (top_v == NULL)
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
memset(top_v, 0, alloc_size); /* zero out memory before continuing */
|
||||
top_p = bp->kmalloced_dma; /* get physical address of buffer */
|
||||
|
||||
|
Verwijs in nieuw issue
Block a user