diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 17:52:01 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 23:42:21 +0400 |
commit | 410235fd4d20b8feaf8930a0575d23acc088aa87 (patch) | |
tree | ad21d071a29ef0ad400393328ca4ab0588d5b2b7 /drivers/tty/isicom.c | |
parent | 44a1bfd95d0a6c0096e79a883197596e1ce83cc3 (diff) | |
download | linux-410235fd4d20b8feaf8930a0575d23acc088aa87.tar.xz |
TTY: remove unneeded tty->index checks
Checking if tty->index is in bounds is not needed. The tty has the
index set in the initial open. This is done in get_tty_driver. And it
can be only in interval <0,driver->num).
So remove the tests which check exactly this interval. Some are
left untouched as they check against the current backing device count.
(Leaving apart that the check is racy in most of the cases.)
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/isicom.c')
-rw-r--r-- | drivers/tty/isicom.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c index b3a28b5f02ad..03c14979accf 100644 --- a/drivers/tty/isicom.c +++ b/drivers/tty/isicom.c @@ -849,8 +849,6 @@ static struct tty_port *isicom_find_port(struct tty_struct *tty) unsigned int board; int line = tty->index; - if (line < 0 || line > PORT_COUNT-1) - return NULL; board = BOARD(line); card = &isi_card[board]; |