dect
/
linux-2.6
Archived
13
0
Fork 0

USB: ftdi_sio: fix problem when the manufacture is a NULL string

On some misconfigured ftdi_sio devices, if the manufacturer string is
NULL, the kernel will oops when the device is plugged in.  This patch
fixes the problem.

Reported-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Tested-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2012-02-28 09:20:09 -08:00
parent 6d161b99f8
commit 656d2b3964
1 changed files with 2 additions and 1 deletions

View File

@ -1769,7 +1769,8 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
dbg("%s", __func__);
if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
if ((udev->manufacturer) &&
(strcmp(udev->manufacturer, "CALAO Systems") == 0))
return ftdi_jtag_probe(serial);
return 0;