Skip to content

Commit 98fa41d

Browse files
ISCAS-Vulabdavem330
authored andcommitted
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>
1 parent 0c47894 commit 98fa41d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/openvswitch/vport-netdev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ static void vport_netdev_free(struct rcu_head *rcu)
137137
{
138138
struct vport *vport = container_of(rcu, struct vport, rcu);
139139

140-
if (vport->dev)
141-
dev_put(vport->dev);
140+
dev_put(vport->dev);
142141
ovs_vport_free(vport);
143142
}
144143

0 commit comments

Comments
 (0)