summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-netdev.c
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2021-12-02 08:51:48 +0100
committerDavid S. Miller <davem@davemloft.net>2021-12-02 14:08:19 +0100
commit98fa41d627604e58c3e486d910ada04d90e67d33 (patch)
tree65633ac401566d2d0b7a449b7c3e3e0baedf964b /net/openvswitch/vport-netdev.c
parentipvlan: Remove redundant if statements (diff)
downloadlinux-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 '')
-rw-r--r--net/openvswitch/vport-netdev.c3
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);
}