drivers: net: Remove remaining alloc/OOM messages
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/memcpy to kmemdup. Removed now unused stack variables. Removed unnecessary parentheses. Neatened alignment. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e9ba103931
commit
14f8dc4953
@@ -354,11 +354,10 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize)
|
||||
int i;
|
||||
struct brcmf_usbreq *req, *reqs;
|
||||
|
||||
reqs = kzalloc(sizeof(struct brcmf_usbreq) * qsize, GFP_ATOMIC);
|
||||
if (reqs == NULL) {
|
||||
brcmf_err("fail to allocate memory!\n");
|
||||
reqs = kcalloc(qsize, sizeof(struct brcmf_usbreq), GFP_ATOMIC);
|
||||
if (reqs == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
req = reqs;
|
||||
|
||||
for (i = 0; i < qsize; i++) {
|
||||
|
Reference in New Issue
Block a user