Skip to content
Snippets Groups Projects
Commit 79f999d0 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

strip: Fix termios assumption


Strip assumes that the tty drivers always have a set_termios method which
may not be true. Check this when binding to the tty so that we don't oops
later.

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 492c2e47
No related branches found
No related tags found
No related merge requests found
...@@ -2611,7 +2611,7 @@ static int strip_open(struct tty_struct *tty) ...@@ -2611,7 +2611,7 @@ static int strip_open(struct tty_struct *tty)
* We need a write method. * We need a write method.
*/ */
if (tty->ops->write == NULL) if (tty->ops->write == NULL || tty->ops->set_termios == NULL)
return -EOPNOTSUPP; return -EOPNOTSUPP;
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment