From: Andrew Morton Cc: Alan Cox Cc: Jason Wessel Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- drivers/char/tty_io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN drivers/char/tty_io.c~tty-the-big-operations-rework-vs-git-kgdb-light drivers/char/tty_io.c --- a/drivers/char/tty_io.c~tty-the-big-operations-rework-vs-git-kgdb-light +++ a/drivers/char/tty_io.c @@ -1181,9 +1181,8 @@ struct tty_driver *tty_find_polling_driv if (*str == '\0') str = 0; - if (tty_line >= 0 && tty_line <= p->num && p->poll_init && - !p->poll_init(p, tty_line, str)) { - + if (tty_line >= 0 && tty_line <= p->num && p->ops && + p->ops->poll_init && !p->ops->poll_init(p, tty_line, str)) { res = p; *line = tty_line; break; _