Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers:net:misc: Remove unnecessary alloc/OOM messages

alloc failures already get standardized OOM
messages and a dump_stack.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joe Perches and committed by
David S. Miller
e68ed8f0 0d2e7a5c

+3 -12
+1 -6
drivers/net/hamradio/dmascc.c
··· 463 463 464 464 /* Initialize what is necessary for write_scc and write_scc_data */ 465 465 info = kzalloc(sizeof(struct scc_info), GFP_KERNEL | GFP_DMA); 466 - if (!info) { 467 - printk(KERN_ERR "dmascc: " 468 - "could not allocate memory for %s at %#3x\n", 469 - hw[type].name, card_base); 466 + if (!info) 470 467 goto out; 471 - } 472 - 473 468 474 469 info->dev[0] = alloc_netdev(0, "", dev_setup); 475 470 if (!info->dev[0]) {
+1 -3
drivers/net/phy/spi_ks8995.c
··· 275 275 pdata = spi->dev.platform_data; 276 276 277 277 ks = kzalloc(sizeof(*ks), GFP_KERNEL); 278 - if (!ks) { 279 - dev_err(&spi->dev, "no memory for private data\n"); 278 + if (!ks) 280 279 return -ENOMEM; 281 - } 282 280 283 281 mutex_init(&ks->lock); 284 282 ks->pdata = pdata;
+1 -3
drivers/net/virtio_net.c
··· 976 976 buf = kzalloc(((uc_count + mc_count) * ETH_ALEN) + 977 977 (2 * sizeof(mac_data->entries)), GFP_ATOMIC); 978 978 mac_data = buf; 979 - if (!buf) { 980 - dev_warn(&dev->dev, "No memory for MAC address buffer\n"); 979 + if (!buf) 981 980 return; 982 - } 983 981 984 982 sg_init_table(sg, 2); 985 983