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)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Jun 2017 22:46:51 +0000 (00:46 +0200)
commit810fb7b7bf8f3ccc4df6ef9a7c05d0a52a9d05ef
tree9e4eed1d0aa6cddbdd2b1d8d0a19899df49077dc
parentba35ae7a8c9da2d9b964fd75825ceb136e4db0a0
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: Willy Tarreau <w@1wt.eu>
drivers/usb/serial/kobil_sct.c