Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e68ed8f0 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

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



alloc failures already get standardized OOM
messages and a dump_stack.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d2e7a5c
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -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 */
	/* Initialize what is necessary for write_scc and write_scc_data */
	info = kzalloc(sizeof(struct scc_info), GFP_KERNEL | GFP_DMA);
	info = kzalloc(sizeof(struct scc_info), GFP_KERNEL | GFP_DMA);
	if (!info) {
	if (!info)
		printk(KERN_ERR "dmascc: "
		       "could not allocate memory for %s at %#3x\n",
		       hw[type].name, card_base);
		goto out;
		goto out;
	}



	info->dev[0] = alloc_netdev(0, "", dev_setup);
	info->dev[0] = alloc_netdev(0, "", dev_setup);
	if (!info->dev[0]) {
	if (!info->dev[0]) {
+1 −3
Original line number Original line Diff line number Diff line
@@ -275,10 +275,8 @@ static int ks8995_probe(struct spi_device *spi)
	pdata = spi->dev.platform_data;
	pdata = spi->dev.platform_data;


	ks = kzalloc(sizeof(*ks), GFP_KERNEL);
	ks = kzalloc(sizeof(*ks), GFP_KERNEL);
	if (!ks) {
	if (!ks)
		dev_err(&spi->dev, "no memory for private data\n");
		return -ENOMEM;
		return -ENOMEM;
	}


	mutex_init(&ks->lock);
	mutex_init(&ks->lock);
	ks->pdata = pdata;
	ks->pdata = pdata;
+1 −3
Original line number Original line Diff line number Diff line
@@ -976,10 +976,8 @@ static void virtnet_set_rx_mode(struct net_device *dev)
	buf = kzalloc(((uc_count + mc_count) * ETH_ALEN) +
	buf = kzalloc(((uc_count + mc_count) * ETH_ALEN) +
		      (2 * sizeof(mac_data->entries)), GFP_ATOMIC);
		      (2 * sizeof(mac_data->entries)), GFP_ATOMIC);
	mac_data = buf;
	mac_data = buf;
	if (!buf) {
	if (!buf)
		dev_warn(&dev->dev, "No memory for MAC address buffer\n");
		return;
		return;
	}


	sg_init_table(sg, 2);
	sg_init_table(sg, 2);