]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
strip: Fix termios assumption
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Mon, 12 May 2008 11:29:25 +0000 (12:29 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 May 2008 14:27:38 +0000 (07:27 -0700)
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>
drivers/net/wireless/strip.c

index 5dd23c93497db90163365b84a7e62917571cd122..883af891ebfb4c54d19daff25495af0a063734f4 100644 (file)
@@ -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;
 
        /*