diff --git a/drivers/tty/smux_ctl.c b/drivers/tty/smux_ctl.c index 7e0e6f8d520..c17495bbe8d 100644 --- a/drivers/tty/smux_ctl.c +++ b/drivers/tty/smux_ctl.c @@ -770,12 +770,13 @@ static unsigned int smux_ctl_poll(struct file *file, poll_table *wait) poll_wait(file, &devp->read_wait_queue, wait); readable = smux_ctl_readable(devp->id); - if (readable < 0) { + if (readable > 0) { + mask = POLLIN | POLLRDNORM; + } else if ((readable < 0) && (readable != -ERESTARTSYS)) { + /* error case (non-signal) received */ pr_err(SMUX_CTL_MODULE_NAME ": %s err%d during poll for smuxctl%d\n", __func__, readable, devp->id); mask = POLLERR; - } else if (readable) { - mask = POLLIN | POLLRDNORM; } return mask;