USB: serial: kobil_sct: fix NULL-deref in write
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:49 +0000 (16:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:46 +0000 (11:22 +0100)
commit1b1fdc7158070c647eefbf728b7ef76857bab027
tree57a556cc71a4c374954ace0edfce7be4064785a9
parentb60b91268cd03cdcf2b76e6bf02dacc32534e3cd
USB: serial: kobil_sct: fix NULL-deref in write

commit 21ce57840243c7b70fbc1ebd3dceeb70bb6e9e09 upstream.

Fix NULL-pointer dereference in write() should the device lack the
expected interrupt-out endpoint:

Unable to handle kernel NULL pointer dereference at virtual address 00000054
...
PC is at kobil_write+0x144/0x2a0 [kobil_sct]

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/kobil_sct.c