From: Greg Kroah-Hartman Date: Tue, 28 Feb 2012 17:20:09 +0000 (-0800) Subject: USB: ftdi_sio: fix problem when the manufacture is a NULL string X-Git-Tag: MMI-PSA29.97-13-9~17266^2~22^2~94 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Tested-by: Wojciech M Zabolotny Cc: stable Signed-off-by: Greg Kroah-Hartman --- 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) 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;