Skip to contentSkip to conversation

bonding: bond_open error return value

PATCH Applied Stephen Hemminger 2 participants 2 messages Jan 26, 2010 – Jan 28, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: bond_open error return value

The convention for API functions in kernel is to return errno value; bond_open would return -1 if alb setup failed. The only reason that could happen is if kmalloc() failed.

drivers/net/bonding/bond_main.c +1 -1
@@ -3650,7 +3650,7 @@ static int bond_open(struct net_device *
 		 */
 		if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) {
 			/* something went wrong - fail the open operation */
-			return -1;
+			return -ENOMEM;
 		}
 
 		INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);
maintainer Applied
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Tue, 26 Jan 2010 01:34:15 -0800

Quoted 5 lines

The convention for API functions in kernel is to return errno value; bond_open would return -1 if alb setup failed. The only reason that could happen is if kmalloc() failed.

Applied.