Message ID | 20211202075148.34136-1-vulab@iscas.ac.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | 98fa41d627604e58c3e486d910ada04d90e67d33 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: openvswitch: Remove redundant if statements | expand |
Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Thu, 2 Dec 2021 07:51:48 +0000 you wrote: > The 'if (dev)' statement already move into dev_{put , hold}, so remove > redundant if statements. > > Signed-off-by: Xu Wang <vulab@iscas.ac.cn> > --- > net/openvswitch/vport-netdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Here is the summary with links: - net: openvswitch: Remove redundant if statements https://git.kernel.org/netdev/net-next/c/98fa41d62760 You are awesome, thank you!
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); }
The 'if (dev)' statement already move into dev_{put , hold}, so remove redundant if statements. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> --- net/openvswitch/vport-netdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)