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>
This commit is contained in:
Xu Wang 2021-12-02 07:51:48 +00:00 committed by David S. Miller
parent 0c4789460e
commit 98fa41d627

View file

@ -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);
}