From: Jiri Slaby Date: Wed, 9 Dec 2009 20:34:15 +0000 (-0800) Subject: tty: char: mxser, remove unnecessary tty test X-Git-Tag: v2.6.34-rc1~216^2~24 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f43a510de8af5748637de21c96f82232b24920e4;p=karo-tx-linux.git tty: char: mxser, remove unnecessary tty test Stanse found unnecessary test in mxser_startup. tty is dereferenced earlier, the test is superfluous. Remove it. Signed-off-by: Jiri Slaby Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 3d923065d9a2..e0c5d2a69046 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -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;