diff options
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index ade5f3f6693b..87437c788476 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -169,11 +169,14 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_ | |||
169 | /* clear slave from tx_hashtbl */ | 169 | /* clear slave from tx_hashtbl */ |
170 | tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl; | 170 | tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl; |
171 | 171 | ||
172 | index = SLAVE_TLB_INFO(slave).head; | 172 | /* skip this if we've already freed the tx hash table */ |
173 | while (index != TLB_NULL_INDEX) { | 173 | if (tx_hash_table) { |
174 | u32 next_index = tx_hash_table[index].next; | 174 | index = SLAVE_TLB_INFO(slave).head; |
175 | tlb_init_table_entry(&tx_hash_table[index], save_load); | 175 | while (index != TLB_NULL_INDEX) { |
176 | index = next_index; | 176 | u32 next_index = tx_hash_table[index].next; |
177 | tlb_init_table_entry(&tx_hash_table[index], save_load); | ||
178 | index = next_index; | ||
179 | } | ||
177 | } | 180 | } |
178 | 181 | ||
179 | tlb_init_slave(slave); | 182 | tlb_init_slave(slave); |