Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7de0b93 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

tuntap: remove unused variable in __tun_detach()



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

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df594563
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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]);