diff options
| -rw-r--r-- | drivers/net/tun.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b393536012fb..027f7aba26af 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
| @@ -486,12 +486,14 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait) | |||
| 486 | { | 486 | { |
| 487 | struct tun_file *tfile = file->private_data; | 487 | struct tun_file *tfile = file->private_data; |
| 488 | struct tun_struct *tun = __tun_get(tfile); | 488 | struct tun_struct *tun = __tun_get(tfile); |
| 489 | struct sock *sk = tun->sk; | 489 | struct sock *sk; |
| 490 | unsigned int mask = 0; | 490 | unsigned int mask = 0; |
| 491 | 491 | ||
| 492 | if (!tun) | 492 | if (!tun) |
| 493 | return POLLERR; | 493 | return POLLERR; |
| 494 | 494 | ||
| 495 | sk = tun->sk; | ||
| 496 | |||
| 495 | DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name); | 497 | DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name); |
| 496 | 498 | ||
| 497 | poll_wait(file, &tun->socket.wait, wait); | 499 | poll_wait(file, &tun->socket.wait, wait); |
