From: Li RongQing Date: Thu, 6 Dec 2018 08:28:11 +0000 (+0800) Subject: tun: remove unnecessary check in tun_flow_update X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5c327f673d2f134ac01c068b511c6ab816b4b41c;p=openwrt%2Fstaging%2Fblogic.git tun: remove unnecessary check in tun_flow_update caller has guaranted that rxhash is not zero Signed-off-by: Li RongQing Acked-by: Jason Wang Signed-off-by: David S. Miller --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d0745dc81976..6760b86547df 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -529,10 +529,7 @@ static void tun_flow_update(struct tun_struct *tun, u32 rxhash, unsigned long delay = tun->ageing_time; u16 queue_index = tfile->queue_index; - if (!rxhash) - return; - else - head = &tun->flows[tun_hashfn(rxhash)]; + head = &tun->flows[tun_hashfn(rxhash)]; rcu_read_lock();