USB: serial: mos7840: fix another NULL-deref at open
authorJohan Hovold <johan@kernel.org>
Thu, 9 Feb 2017 11:11:41 +0000 (12:11 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 5 Jun 2017 20:13:47 +0000 (21:13 +0100)
commitd67efe728af45f3524360a4e3987ff63203f0c62
tree909d3e66af3f73802fc6924ad428e9fcf8c9f777
parent779c8f4d451dc3a61657a965b3d5a68f34657d46
USB: serial: mos7840: fix another NULL-deref at open

commit 5182c2cf2a9bfb7f066ef0bdd2bb6330b94dd74e upstream.

Fix another NULL-pointer dereference at open should a malicious device
lack an interrupt-in endpoint.

Note that the driver has a broken check for an interrupt-in endpoint
which means that an interrupt URB has never even been submitted.

Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/mos7840.c