Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[linux-2.6.git] / drivers / isdn / i4l / isdn_tty.c
index 89a2887..3831abd 100644 (file)
@@ -1590,12 +1590,9 @@ static int
 isdn_tty_open(struct tty_struct *tty, struct file *filp)
 {
        modem_info *info;
-       int retval, line;
+       int retval;
 
-       line = tty->index;
-       if (line < 0 || line >= ISDN_MAX_CHANNELS)
-               return -ENODEV;
-       info = &dev->mdm.info[line];
+       info = &dev->mdm.info[tty->index];
        if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open"))
                return -ENODEV;
        if (!try_module_get(info->owner)) {