Skip to contentSkip to conversation

printk: fix failure to return error in devkmsg_poll

PATCH New Nicolas Kaiser 1 participant 1 message Apr 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk: fix failure to return error in devkmsg_poll

Error value got overwritten instantly.

---
 kernel/printk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/printk.c +2 -1
index abbdd9e..6317194 100644
@@ -608,7 +608,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);
 
Signature · 1 line
1.8.1.2