USB: serial: cyberjack: fix NULL-deref at open
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:40 +0000 (16:39 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Jan 2017 09:37:14 +0000 (10:37 +0100)
commit3dca01114dcecb1cf324534cd8d75fd1306a516b
treee441fbb5031e9bca103758097e215209409d2fe9
parent427157631648c980e8bba4d73a21508b9e1a47ec
USB: serial: cyberjack: fix NULL-deref at open

Fix NULL-pointer dereference when clearing halt at open should the device
lack a bulk-out endpoint.

Unable to handle kernel NULL pointer dereference at virtual address 00000030
...
PC is at cyberjack_open+0x40/0x9c [cyberjack]

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cyberjack.c