USB: serial/kobil_sct, fix potential tty NULL dereference
authorJiri Slaby <jslaby@suse.cz>
Mon, 28 Feb 2011 09:34:06 +0000 (10:34 +0100)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:38 +0000 (11:58 -0700)
commite688c3c8e6031059fbea2ebdb2f07948280a9561
tree387bec9f0ed4a1303d1ce00a090e96cab427b971
parent37e1711cff542c857e3c95ed0e6ac6c09ac819ef
USB: serial/kobil_sct, fix potential tty NULL dereference

commit 6960f40a954619857e7095a6179eef896f297077 upstream.

Make sure that we check the return value of tty_port_tty_get.
Sometimes it may return NULL and we later dereference that.

The only place here is in kobil_read_int_callback, so fix it.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/kobil_sct.c