bonding: remove unnecessary NULL check in bond_destructor

The free_percpu function also could check whether "rr_tx_counter"
parameter is NULL. Therefore, remove NULL check in bond_destructor.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Zhengchao Shao 2023-08-10 21:50:07 +08:00 committed by David S. Miller
parent a8f3f4b448
commit f5370ba359
1 changed files with 1 additions and 2 deletions

View File

@ -5863,8 +5863,7 @@ static void bond_destructor(struct net_device *bond_dev)
if (bond->wq)
destroy_workqueue(bond->wq);
if (bond->rr_tx_counter)
free_percpu(bond->rr_tx_counter);
free_percpu(bond->rr_tx_counter);
}
void bond_setup(struct net_device *bond_dev)