Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03315b59 authored by Alexander Beregalov's avatar Alexander Beregalov Committed by Linus Torvalds
Browse files

uml: line.c: avoid NULL pointer dereference



Assign tty only if line is not NULL.

[akpm@linux-foundation.org: simplification]
Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent be149452
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}