提交 722d5e4a 编写于 作者: J Jiri Slaby 提交者: Linus Torvalds

[PATCH] Char: mxser_new, do not null driver_data

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: NJiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f64c84a1
...@@ -927,9 +927,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) ...@@ -927,9 +927,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
struct mxser_port *info; struct mxser_port *info;
int retval, line; int retval, line;
/* initialize driver_data in case something fails */
tty->driver_data = NULL;
line = tty->index; line = tty->index;
if (line == MXSER_PORTS) if (line == MXSER_PORTS)
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册