提交 03315b59 编写于 作者: A Alexander Beregalov 提交者: Linus Torvalds

uml: line.c: avoid NULL pointer dereference

Assign tty only if line is not NULL.

[akpm@linux-foundation.org: simplification]
Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 be149452
......@@ -18,10 +18,10 @@ static irqreturn_t line_interrupt(int irq, void *data)
{
struct chan *chan = data;
struct line *line = chan->line;
struct tty_struct *tty = line->tty;
struct tty_struct *tty;
if (line)
chan_interrupt(&line->chan_list, &line->task, tty, irq);
chan_interrupt(&line->chan_list, &line->task, line->tty, irq);
return IRQ_HANDLED;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册