Skip to content

Commit

Permalink
strip: Fix termios assumption
Browse files Browse the repository at this point in the history
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: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed May 12, 2008
1 parent 492c2e4 commit 79f999d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,7 @@ static int strip_open(struct tty_struct *tty)
* We need a write method.
*/

if (tty->ops->write == NULL)
if (tty->ops->write == NULL || tty->ops->set_termios == NULL)
return -EOPNOTSUPP;

/*
Expand Down

0 comments on commit 79f999d

Please sign in to comment.