Message ID | 20230810135007.3834770-6-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f5370ba3590d1e141c288eed2c0e53618b91356d |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | bonding: do some cleanups in bond driver | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/apply | success | Patch already applied to net-next |
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)
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> --- drivers/net/bonding/bond_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)