Skip to content

Commit

Permalink
tty: char: mxser, remove unnecessary tty test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 2090436 commit f43a510
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/mxser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f43a510

Please sign in to comment.