[PATCH] Char: mxser_new, do not null driver_data
authorJiri Slaby <jirislaby@gmail.com>
Sat, 10 Feb 2007 09:45:22 +0000 (01:45 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 18:51:29 +0000 (10:51 -0800)
driver_data are initialzed to NULL from tty layer, no need to do it in the
driver.  In this case it cases oops, since driver_data may be NULL for a short
while for another closing process.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/mxser_new.c

index 4c805496fb36a5ec40a93d865dbb009d7023afab..1c8e00c4caad0a1aeb8023475f6b7b150e4a9d43 100644 (file)
@@ -927,9 +927,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
        struct mxser_port *info;
        int retval, line;
 
-       /* initialize driver_data in case something fails */
-       tty->driver_data = NULL;
-
        line = tty->index;
        if (line == MXSER_PORTS)
                return 0;