diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2021-12-02 08:51:48 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-02 14:08:19 +0100 |
commit | 98fa41d627604e58c3e486d910ada04d90e67d33 (patch) | |
tree | 65633ac401566d2d0b7a449b7c3e3e0baedf964b /net/openvswitch | |
parent | ipvlan: Remove redundant if statements (diff) | |
download | linux-98fa41d627604e58c3e486d910ada04d90e67d33.tar.xz linux-98fa41d627604e58c3e486d910ada04d90e67d33.zip |
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); } |