bonding: bond_open error return value
Subsystems (3)
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.
Signed-off-by Stephen Hemminger <[email protected]>
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);
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_openwould return -1 if alb setup failed. The only reason that could happen is ifkmalloc()failed.Signed-off-by Stephen Hemminger <[email protected]>
Applied.