diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-28 09:20:09 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-02 09:26:51 -0700 |
commit | 9c7725750f3c268f0fced0bee357169ed373fc91 (patch) | |
tree | 1136ae943b69142590bf23e4d9469c365cbc55aa | |
parent | a885803ba915fa6e6bb8a92a79e6e38f3d76fc99 (diff) | |
download | kernel_samsung_aries-9c7725750f3c268f0fced0bee357169ed373fc91.zip kernel_samsung_aries-9c7725750f3c268f0fced0bee357169ed373fc91.tar.gz kernel_samsung_aries-9c7725750f3c268f0fced0bee357169ed373fc91.tar.bz2 |
USB: ftdi_sio: fix problem when the manufacture is a NULL string
commit 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 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: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Tested-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 78c7d42..264ed9a 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1755,7 +1755,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; |