USB: serial: kobil_sct: fix NULL-deref in write
commitd6e7aa701630922fc782e207d82e3caf0a2a9ea3
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:49 +0000 (3 16:39 +0100)
committerSasha Levin <alexander.levin@verizon.com>
Fri, 3 Mar 2017 02:51:42 +0000 (2 21:51 -0500)
tree57b4dbe81baaa64d3b2e84d6914cfd6d0d9e9718
parent77c5492b11f6c0f075c3f09e3a10874a4de3e5db
USB: serial: kobil_sct: fix NULL-deref in write

[ Upstream commit 21ce57840243c7b70fbc1ebd3dceeb70bb6e9e09 ]

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")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/usb/serial/kobil_sct.c