浏览代码

tuntap: remove unused variable in __tun_detach()

The variable dev is initialized but never used
otherwise, so remove the unused variable.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun 12 年之前
父节点
当前提交
f7de0b9368
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      drivers/net/tun.c

+ 0 - 2
drivers/net/tun.c

@@ -409,14 +409,12 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
 {
 {
 	struct tun_file *ntfile;
 	struct tun_file *ntfile;
 	struct tun_struct *tun;
 	struct tun_struct *tun;
-	struct net_device *dev;
 
 
 	tun = rtnl_dereference(tfile->tun);
 	tun = rtnl_dereference(tfile->tun);
 
 
 	if (tun && !tfile->detached) {
 	if (tun && !tfile->detached) {
 		u16 index = tfile->queue_index;
 		u16 index = tfile->queue_index;
 		BUG_ON(index >= tun->numqueues);
 		BUG_ON(index >= tun->numqueues);
-		dev = tun->dev;
 
 
 		rcu_assign_pointer(tun->tfiles[index],
 		rcu_assign_pointer(tun->tfiles[index],
 				   tun->tfiles[tun->numqueues - 1]);
 				   tun->tfiles[tun->numqueues - 1]);