提交 656d2b39 编写于 作者: G Greg Kroah-Hartman

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: NWojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Tested-by: NWojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6d161b99
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册