diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2023-08-10 15:50:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-11 12:10:55 +0200 |
commit | f5370ba3590d1e141c288eed2c0e53618b91356d (patch) | |
tree | 5f66090e140d984d8f22e1be84dfe67aeaa92095 /drivers/net/bonding/bond_main.c | |
parent | bonding: use bond_set_slave_arr to simplify code (diff) | |
download | linux-f5370ba3590d1e141c288eed2c0e53618b91356d.tar.xz linux-f5370ba3590d1e141c288eed2c0e53618b91356d.zip |
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>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index de3ae9c57da0..f398bec78457 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -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) |