Skip to content

Commit

Permalink
tun: Use POLLERR not EBADF in tun_chr_poll
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Jan 22, 2009
1 parent a7385ba commit eac9e90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit eac9e90

Please sign in to comment.