mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
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:
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;
|
||||
|
||||
if (!tun)
|
||||
return -EBADFD;
|
||||
return POLLERR;
|
||||
|
||||
DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user