]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/s390/char/con3215.c
TTY: remove unneeded tty->index checks
[mirror_ubuntu-bionic-kernel.git] / drivers / s390 / char / con3215.c
index 934458ad55e51782c7b595b48c5f3088393b8495..ed23fec7abbed11b051b91a968c6e63defda2269 100644 (file)
@@ -926,13 +926,9 @@ console_initcall(con3215_init);
 static int tty3215_open(struct tty_struct *tty, struct file * filp)
 {
        struct raw3215_info *raw;
-       int retval, line;
+       int retval;
 
-       line = tty->index;
-       if ((line < 0) || (line >= NR_3215))
-               return -ENODEV;
-
-       raw = raw3215[line];
+       raw = raw3215[tty->index];
        if (raw == NULL)
                return -ENODEV;
 
@@ -1137,7 +1133,6 @@ static int __init tty3215_init(void)
         * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
         */
 
-       driver->owner = THIS_MODULE;
        driver->driver_name = "tty3215";
        driver->name = "ttyS";
        driver->major = TTY_MAJOR;