summaryrefslogtreecommitdiff
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2020-02-21 12:53:09 -0700
committerDavid S. Miller <davem@davemloft.net>2020-02-23 16:39:21 -0800
commitfb0b1c60421f2fb8de2f2dfa628c7c1c3f034bcc (patch)
treed9012880df5d2f220bc5446bef831620eb5affb4 /drivers/net/tun.c
parent53da93259afe2627b3f82ca964006dc0c9c779ac (diff)
tun: Remove unnecessary BUG_ON check in tun_net_xmit
The BUG_ON for NULL tfile is now redundant due to a recently added null check after the rcu_dereference. Remove the BUG_ON. Cc: Jason Wang <jasowang@redhat.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 650c937ed56b..79f248cb282d 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1078,8 +1078,6 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
tun_debug(KERN_INFO, tun, "tun_net_xmit %d\n", skb->len);
- BUG_ON(!tfile);
-
/* Drop if the filter does not like it.
* This is a noop if the filter is disabled.
* Filter can be enabled only for the TAP devices. */