tun: Use POLLERR not EBADF in tun_chr_poll
EBADF is meaningless in the context of a poll mask so use POLLERR instead. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a7385ba211
commit
eac9e90265
@@ -382,7 +382,7 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
|
|||||||
unsigned int mask = POLLOUT | POLLWRNORM;
|
unsigned int mask = POLLOUT | POLLWRNORM;
|
||||||
|
|
||||||
if (!tun)
|
if (!tun)
|
||||||
return -EBADFD;
|
return POLLERR;
|
||||||
|
|
||||||
DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
|
DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user