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

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

drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages



alloc failures use dump_stack so emitting an additional
out-of-memory message is an unnecessary duplication.

Remove the allocation failure messages.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f3d9cb2
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -180,11 +180,9 @@ static int tlb_initialize(struct bonding *bond)
	int i;

	new_hashtbl = kzalloc(size, GFP_KERNEL);
	if (!new_hashtbl) {
		pr_err("%s: Error: Failed to allocate TLB hash table\n",
		       bond->dev->name);
	if (!new_hashtbl)
		return -1;
	}

	_lock_tx_hashtbl_bh(bond);

	bond_info->tx_hashtbl = new_hashtbl;
@@ -784,11 +782,9 @@ static int rlb_initialize(struct bonding *bond)
	int i;

	new_hashtbl = kmalloc(size, GFP_KERNEL);
	if (!new_hashtbl) {
		pr_err("%s: Error: Failed to allocate RLB hash table\n",
		       bond->dev->name);
	if (!new_hashtbl)
		return -1;
	}

	_lock_rx_hashtbl_bh(bond);

	bond_info->rx_hashtbl = new_hashtbl;
+1 −3
Original line number Diff line number Diff line
@@ -639,10 +639,8 @@ static int __init slcan_init(void)
	printk(KERN_INFO "slcan: %d dynamic interface channels.\n", maxdev);

	slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL);
	if (!slcan_devs) {
		printk(KERN_ERR "slcan: can't allocate slcan device array!\n");
	if (!slcan_devs)
		return -ENOMEM;
	}

	/* Fill in our line protocol discipline, and register it */
	status = tty_register_ldisc(N_SLCAN, &slc_ldisc);
+1 −3
Original line number Diff line number Diff line
@@ -621,11 +621,9 @@ static void *ni65_alloc_mem(struct net_device *dev,char *what,int size,int type)
	}
	else {
		ret = ptr = kmalloc(T_BUF_SIZE,GFP_KERNEL | GFP_DMA);
		if(!ret) {
			printk(KERN_WARNING "%s: unable to allocate %s memory.\n",dev->name,what);
		if(!ret)
			return NULL;
	}
	}
	if( (u32) virt_to_phys(ptr+size) > 0x1000000) {
		printk(KERN_WARNING "%s: unable to allocate %s memory in lower 16MB!\n",dev->name,what);
		if(type)
+1 −3
Original line number Diff line number Diff line
@@ -1660,11 +1660,9 @@ static int __init bmac_init(void)
{
	if (bmac_emergency_rxbuf == NULL) {
		bmac_emergency_rxbuf = kmalloc(RX_BUFLEN, GFP_KERNEL);
		if (bmac_emergency_rxbuf == NULL) {
			printk(KERN_ERR "BMAC: can't allocate emergency RX buffer\n");
		if (bmac_emergency_rxbuf == NULL)
			return -ENOMEM;
	}
	}

	return macio_register_driver(&bmac_driver);
}
+1 −3
Original line number Diff line number Diff line
@@ -136,11 +136,9 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
	 */
	if (dummy_buf == NULL) {
		dummy_buf = kmalloc(RX_BUFLEN+2, GFP_KERNEL);
		if (dummy_buf == NULL) {
			printk(KERN_ERR "MACE: couldn't allocate dummy buffer\n");
		if (dummy_buf == NULL)
			return -ENOMEM;
	}
	}

	if (macio_request_resources(mdev, "mace")) {
		printk(KERN_ERR "MACE: can't request IO resources !\n");
Loading