Commit f12847e2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Willy Tarreau

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

commit 656d2b39 upstream.

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: default avatarWojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Tested-by: default avatarWojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 9d899d1f
......@@ -1784,7 +1784,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment