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>
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;
// 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;