tty: char: mxser, remove unnecessary tty test
authorJiri Slaby <jirislaby@gmail.com>
Wed, 9 Dec 2009 20:34:15 +0000 (12:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:43:12 +0000 (14:43 -0800)
Stanse found unnecessary test in mxser_startup.

tty is dereferenced earlier, the test is superfluous. Remove it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/mxser.c

index 3d923065d9a29ca1381023d132759bcb4b735ed2..e0c5d2a690464d37138daf88f5842aab027defe0 100644 (file)
@@ -895,8 +895,7 @@ static int mxser_activate(struct tty_port *port, struct tty_struct *tty)
        if (inb(info->ioaddr + UART_LSR) == 0xff) {
                spin_unlock_irqrestore(&info->slock, flags);
                if (capable(CAP_SYS_ADMIN)) {
-                       if (tty)
-                               set_bit(TTY_IO_ERROR, &tty->flags);
+                       set_bit(TTY_IO_ERROR, &tty->flags);
                        return 0;
                } else
                        return -ENODEV;