OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c47894
)
net: openvswitch: Remove redundant if statements
author
Xu Wang
<vulab@iscas.ac.cn>
Thu, 2 Dec 2021 07:51:48 +0000
(07:51 +0000)
committer
David S. Miller
<davem@davemloft.net>
Thu, 2 Dec 2021 13:08:19 +0000
(13:08 +0000)
The 'if (dev)' statement already move into dev_{put , hold}, so remove
redundant if statements.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/vport-netdev.c
patch
|
blob
|
history
diff --git
a/net/openvswitch/vport-netdev.c
b/net/openvswitch/vport-netdev.c
index
8e1a88f
..
c1ad669
100644
(file)
--- a/
net/openvswitch/vport-netdev.c
+++ b/
net/openvswitch/vport-netdev.c
@@
-137,8
+137,7
@@
static void vport_netdev_free(struct rcu_head *rcu)
{
struct vport *vport = container_of(rcu, struct vport, rcu);
- if (vport->dev)
- dev_put(vport->dev);
+ dev_put(vport->dev);
ovs_vport_free(vport);
}