diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2021-12-02 07:51:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-02 13:08:19 +0000 |
commit | 98fa41d627604e58c3e486d910ada04d90e67d33 (patch) | |
tree | 65633ac401566d2d0b7a449b7c3e3e0baedf964b /net/openvswitch | |
parent | 0c4789460e8cc6a84f10a06ba9410a31432550e1 (diff) | |
download | linux-98fa41d627604e58c3e486d910ada04d90e67d33.tar.bz2 |
net: openvswitch: Remove redundant if statements
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>
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/vport-netdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index 8e1a88f13622..c1ad6699b1f8 100644 --- 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); } |