From: Johan Hovold Date: Tue, 3 Jan 2017 15:39:59 +0000 (+0100) Subject: USB: serial: oti6858: fix NULL-deref at open X-Git-Tag: v3.2.87~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=390eb6e1ca74cb6dd69bab39e2402f7922ab6dfe;p=pandora-kernel.git USB: serial: oti6858: fix NULL-deref at open commit 5afeef2366db14587b65558bbfd5a067542e07fb upstream. 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 oti6858_open+0x30/0x1d0 [oti6858] Note that a missing interrupt-in endpoint would have caused open() to fail. Fixes: 49cdee0ed0fc ("USB: oti6858 usb-serial driver (in Nokia CA-42 cable)") Signed-off-by: Johan Hovold [bwh: Backported to 3.2: add this check to the existing usb_serial_driver::attach implementation] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed