drivers:net:misc: Remove unnecessary alloc/OOM messages
authorJoe Perches <joe@perches.com>
Sun, 3 Feb 2013 17:28:15 +0000 (17:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Feb 2013 18:22:35 +0000 (13:22 -0500)
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>
drivers/net/hamradio/dmascc.c
drivers/net/phy/spi_ks8995.c
drivers/net/virtio_net.c

index ce555d9..6636022 100644 (file)
@@ -463,13 +463,8 @@ static int __init setup_adapter(int card_base, int type, int n)
 
        /* Initialize what is necessary for write_scc and write_scc_data */
        info = kzalloc(sizeof(struct scc_info), GFP_KERNEL | GFP_DMA);
-       if (!info) {
-               printk(KERN_ERR "dmascc: "
-                      "could not allocate memory for %s at %#3x\n",
-                      hw[type].name, card_base);
+       if (!info)
                goto out;
-       }
-
 
        info->dev[0] = alloc_netdev(0, "", dev_setup);
        if (!info->dev[0]) {
index 41eb8ff..5c87eef 100644 (file)
@@ -275,10 +275,8 @@ static int ks8995_probe(struct spi_device *spi)
        pdata = spi->dev.platform_data;
 
        ks = kzalloc(sizeof(*ks), GFP_KERNEL);
-       if (!ks) {
-               dev_err(&spi->dev, "no memory for private data\n");
+       if (!ks)
                return -ENOMEM;
-       }
 
        mutex_init(&ks->lock);
        ks->pdata = pdata;
index eda2042..381a2d8 100644 (file)
@@ -976,10 +976,8 @@ static void virtnet_set_rx_mode(struct net_device *dev)
        buf = kzalloc(((uc_count + mc_count) * ETH_ALEN) +
                      (2 * sizeof(mac_data->entries)), GFP_ATOMIC);
        mac_data = buf;
-       if (!buf) {
-               dev_warn(&dev->dev, "No memory for MAC address buffer\n");
+       if (!buf)
                return;
-       }
 
        sg_init_table(sg, 2);