diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-28 12:20:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-28 12:22:04 -0500 |
commit | 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 (patch) | |
tree | 950d7bfbdbb0b5525b2613e330393f9c082a27aa /drivers/usb/serial/ftdi_sio.c | |
parent | 6d161b99f875269ad4ffa44375e1e54bca6fd02e (diff) |
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>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index feafa85dd07e..989262606684 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1769,7 +1769,8 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial) | |||
1769 | 1769 | ||
1770 | dbg("%s", __func__); | 1770 | dbg("%s", __func__); |
1771 | 1771 | ||
1772 | if (strcmp(udev->manufacturer, "CALAO Systems") == 0) | 1772 | if ((udev->manufacturer) && |
1773 | (strcmp(udev->manufacturer, "CALAO Systems") == 0)) | ||
1773 | return ftdi_jtag_probe(serial); | 1774 | return ftdi_jtag_probe(serial); |
1774 | 1775 | ||
1775 | return 0; | 1776 | return 0; |