aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2013-04-29 19:17:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:14 -0400
commit0a285317daf785424c884d1a7548705c60bc42cc (patch)
tree196895c36f8252f84bbc6b3b6d776f656267d5a0 /kernel/printk.c
parent1b2c289b4f9018f4bd54d22ab54aaeda9181cd2a (diff)
printk: fix failure to return error in devkmsg_poll()
Error value got overwritten instantly. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 1c8ca176458f..376914e2869d 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -601,7 +601,8 @@ static unsigned int devkmsg_poll(struct file *file, poll_table *wait)
601 /* return error when data has vanished underneath us */ 601 /* return error when data has vanished underneath us */
602 if (user->seq < log_first_seq) 602 if (user->seq < log_first_seq)
603 ret = POLLIN|POLLRDNORM|POLLERR|POLLPRI; 603 ret = POLLIN|POLLRDNORM|POLLERR|POLLPRI;
604 ret = POLLIN|POLLRDNORM; 604 else
605 ret = POLLIN|POLLRDNORM;
605 } 606 }
606 raw_spin_unlock_irq(&logbuf_lock); 607 raw_spin_unlock_irq(&logbuf_lock);
607 608