Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Xu Wang and committed by
David S. Miller
98fa41d6 0c478946

+1 -2
+1 -2
net/openvswitch/vport-netdev.c
··· 137 137 { 138 138 struct vport *vport = container_of(rcu, struct vport, rcu); 139 139 140 - if (vport->dev) 141 - dev_put(vport->dev); 140 + dev_put(vport->dev); 142 141 ovs_vport_free(vport); 143 142 } 144 143