• Jiri Slaby's avatar
    TTY: serial_core, remove invalid test · 32ad3a77
    Jiri Slaby authored
    tty->index (named here as line) is set up in initialize_tty_struct.
    The value is checked in get_tty_driver for the found driver as:
    	if (device < base || device >= base + p->num)
    		continue;
    	*index = device - base;
    
    So index/line can never be more than driver->num. Hence remove this
    test from uart_open.
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    Cc: Alan Cox <alan@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    32ad3a77
serial_core.c 61.6 KB