Skip to content

Commit

Permalink
printk: fix failure to return error in devkmsg_poll()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nikai3d authored and torvalds committed Apr 30, 2013
1 parent 1b2c289 commit 0a28531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0a28531

Please sign in to comment.