From: Nicolas Kaiser Date: Mon, 29 Apr 2013 23:17:20 +0000 (-0700) Subject: printk: fix failure to return error in devkmsg_poll() X-Git-Tag: v3.10-rc1~178^2~276 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a285317daf785424c884d1a7548705c60bc42cc;p=platform%2Fupstream%2Fkernel-adaptation-pc.git printk: fix failure to return error in devkmsg_poll() Error value got overwritten instantly. Signed-off-by: Nicolas Kaiser Cc: Kay Sievers Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/printk.c b/kernel/printk.c index 1c8ca17..376914e 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -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);