summaryrefslogtreecommitdiff
path: root/drivers/isdn/capi
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-05 14:52:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 11:42:21 -0800
commit410235fd4d20b8feaf8930a0575d23acc088aa87 (patch)
treead21d071a29ef0ad400393328ca4ab0588d5b2b7 /drivers/isdn/capi
parent44a1bfd95d0a6c0096e79a883197596e1ce83cc3 (diff)
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/isdn/capi')
-rw-r--r--drivers/isdn/capi/capi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index baf08eba495c..3a7905b06e53 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1013,8 +1013,7 @@ static const struct file_operations capi_fops =
static int
capinc_tty_install(struct tty_driver *driver, struct tty_struct *tty)
{
- int idx = tty->index;
- struct capiminor *mp = capiminor_get(idx);
+ struct capiminor *mp = capiminor_get(tty->index);
int ret = tty_standard_install(driver, tty);
if (ret == 0)