Skip to content

Commit

Permalink
USB: ftdi_sio: fix problem when the manufacture is a NULL string
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Feb 28, 2012
1 parent 6d161b9 commit 656d2b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 656d2b3

Please sign in to comment.