Skip to content

Commit

Permalink
tuntap: remove unused variable in __tun_detach()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Mar 13, 2013
1 parent df59456 commit f7de0b9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,12 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
{
struct tun_file *ntfile;
struct tun_struct *tun;
struct net_device *dev;

tun = rtnl_dereference(tfile->tun);

if (tun && !tfile->detached) {
u16 index = tfile->queue_index;
BUG_ON(index >= tun->numqueues);
dev = tun->dev;

rcu_assign_pointer(tun->tfiles[index],
tun->tfiles[tun->numqueues - 1]);
Expand Down

0 comments on commit f7de0b9

Please sign in to comment.