diff options
author | Peter Pan(潘卫平) <panweiping3@gmail.com> | 2011-06-13 00:30:10 -0400 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-13 18:29:41 -0400 |
commit | bf0239a98a7378c6a1a6b01701ec5e27591f52ce (patch) | |
tree | 8282afe86c493615aa787be4ff4e2e1b4024f6ff /drivers/net/bonding/bond_3ad.c | |
parent | 081b1b1bb27f1f4a3b682f4cf75103108f2066d7 (diff) |
bonding:delete a dereference before check
Dan Carpenter found that there was a dereference before a check,
added in 56d00c677de0(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>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 6122725fc7c2..77da2e849623 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1900,7 +1900,6 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution) | |||
1900 | int bond_3ad_bind_slave(struct slave *slave) | 1900 | int bond_3ad_bind_slave(struct slave *slave) |
1901 | { | 1901 | { |
1902 | struct bonding *bond = bond_get_bond_by_slave(slave); | 1902 | struct bonding *bond = bond_get_bond_by_slave(slave); |
1903 | int lacp_fast = bond->params.lacp_fast; | ||
1904 | struct port *port; | 1903 | struct port *port; |
1905 | struct aggregator *aggregator; | 1904 | struct aggregator *aggregator; |
1906 | 1905 | ||
@@ -1916,7 +1915,7 @@ int bond_3ad_bind_slave(struct slave *slave) | |||
1916 | // port initialization | 1915 | // port initialization |
1917 | port = &(SLAVE_AD_INFO(slave).port); | 1916 | port = &(SLAVE_AD_INFO(slave).port); |
1918 | 1917 | ||
1919 | ad_initialize_port(port, lacp_fast); | 1918 | ad_initialize_port(port, bond->params.lacp_fast); |
1920 | 1919 | ||
1921 | port->slave = slave; | 1920 | port->slave = slave; |
1922 | port->actor_port_number = SLAVE_AD_INFO(slave).id; | 1921 | port->actor_port_number = SLAVE_AD_INFO(slave).id; |