uml: line.c: avoid NULL pointer dereference
authorAlexander Beregalov <a.beregalov@gmail.com>
Fri, 5 Mar 2010 21:42:33 +0000 (13:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Mar 2010 19:26:28 +0000 (11:26 -0800)
commit03315b59165ee2049a4b903a1b0b8bf673d701fa
tree92513448a8af5e2a0b1f228310154fea14e44c2b
parentbe1494527c4dea4db87749d08b09be23327157dc
uml: line.c: avoid NULL pointer dereference

Assign tty only if line is not NULL.

[akpm@linux-foundation.org: simplification]
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/drivers/line.c