From: Eric W. Biederman Date: Tue, 20 Jan 2009 10:59:05 +0000 (+0000) Subject: tun: Use POLLERR not EBADF in tun_chr_poll X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=eac9e902658dab1e097b8ef064e9e3d16c152cc9;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 20ef14dc5603..8743de9d2572 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -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);