printk: fix failure to return error in devkmsg_poll()

Error value got overwritten instantly.

Signed-off-by: Nicolas Kaiser <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Nicolas Kaiser 2013-04-29 16:17:20 -07:00 • committed by Linus Torvalds
commit 0a285317da

View file

@ -601,7 +601,8 @@ static unsigned int devkmsg_poll(struct file *file, poll_table *wait)
/* return error when data has vanished underneath us */
if (user->seq < log_first_seq)
ret = POLLIN|POLLRDNORM|POLLERR|POLLPRI;
ret = POLLIN|POLLRDNORM;
else
ret = POLLIN|POLLRDNORM;
}
raw_spin_unlock_irq(&logbuf_lock);