projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8f3f4b
)
bonding: remove unnecessary NULL check in bond_destructor
author
Zhengchao Shao
<shaozhengchao@huawei.com>
Thu, 10 Aug 2023 13:50:07 +0000
(21:50 +0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 11 Aug 2023 10:10:55 +0000
(11:10 +0100)
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>
drivers/net/bonding/bond_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/bonding/bond_main.c
b/drivers/net/bonding/bond_main.c
index de3ae9c57da07fa0a0056abf9b8fed636ff262bd..f398bec784574d7bdac49f5a6335394dc3d17945 100644
(file)
--- 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)