summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2021-12-02 07:51:48 +0000
committerDavid S. Miller <davem@davemloft.net>2021-12-02 13:08:19 +0000
commit98fa41d627604e58c3e486d910ada04d90e67d33 (patch)
tree65633ac401566d2d0b7a449b7c3e3e0baedf964b /net
parent0c4789460e8cc6a84f10a06ba9410a31432550e1 (diff)
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')
-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);
}