]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: serial: mos7840: fix NULL-deref at open
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:55 +0000 (16:39 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Jan 2017 09:37:20 +0000 (10:37 +0100)
commit5c75633ef751dd4cd8f443dc35152c1ae563162e
treec13653b5c65ae3a665c28a3c5f0e98698908c924
parent9da049bcedf43e20e8cb77ee00a1239497ed9fa2
USB: serial: mos7840: fix NULL-deref at open

Fix NULL-pointer dereference in open() should the device lack the
expected endpoints:

Unable to handle kernel NULL pointer dereference at virtual address 00000030
...
PC is at mos7840_open+0x88/0x8dc [mos7840]

Note that we continue to treat the interrupt-in endpoint as optional for
now.

Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7840.c