]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Mar 2011 20:16:45 +0000 (13:16 -0700)
commit691027e05a05ec4e64939c9099a47e30b9b23f54
treeaf961961755665e2c6ea30263f8defa3ec720d41
parent9390d630e93fd278b9838611ccd2074d61064762
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>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/kobil_sct.c