Skip to content

Commit

Permalink
bonding:delete a dereference before check
Browse files Browse the repository at this point in the history
Dan Carpenter found that there was a dereference before a check,
added in 56d00c6(bonding:delete lacp_fast from ad_bond_info).

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
  • Loading branch information
Peter Pan(潘卫平) authored and David S. Miller committed Jun 13, 2011
1 parent 081b1b1 commit bf0239a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,6 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)
int bond_3ad_bind_slave(struct slave *slave)
{
struct bonding *bond = bond_get_bond_by_slave(slave);
int lacp_fast = bond->params.lacp_fast;
struct port *port;
struct aggregator *aggregator;

Expand All @@ -1916,7 +1915,7 @@ int bond_3ad_bind_slave(struct slave *slave)
// port initialization
port = &(SLAVE_AD_INFO(slave).port);

ad_initialize_port(port, lacp_fast);
ad_initialize_port(port, bond->params.lacp_fast);

port->slave = slave;
port->actor_port_number = SLAVE_AD_INFO(slave).id;
Expand Down

0 comments on commit bf0239a

Please sign in to comment.