aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cp2101.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cp2101.c')
-rw-r--r--drivers/usb/serial/cp2101.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index dc7a069503e0..e0c2acdb3f06 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -32,7 +32,7 @@
32/* 32/*
33 * Version Information 33 * Version Information
34 */ 34 */
35#define DRIVER_VERSION "v0.06" 35#define DRIVER_VERSION "v0.07"
36#define DRIVER_DESC "Silicon Labs CP2101/CP2102 RS232 serial adaptor driver" 36#define DRIVER_DESC "Silicon Labs CP2101/CP2102 RS232 serial adaptor driver"
37 37
38/* 38/*
@@ -58,6 +58,7 @@ static struct usb_device_id id_table [] = {
58 { USB_DEVICE(0x10A6, 0xAA26) }, /* Knock-off DCU-11 cable */ 58 { USB_DEVICE(0x10A6, 0xAA26) }, /* Knock-off DCU-11 cable */
59 { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */ 59 { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */
60 { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */ 60 { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */
61 { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */
61 { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ 62 { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */
62 { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ 63 { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
63 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ 64 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */
@@ -169,9 +170,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
169 /* Number of integers required to contain the array */ 170 /* Number of integers required to contain the array */
170 length = (((size - 1) | 3) + 1)/4; 171 length = (((size - 1) | 3) + 1)/4;
171 172
172 buf = kmalloc (length * sizeof(u32), GFP_KERNEL); 173 buf = kcalloc(length, sizeof(u32), GFP_KERNEL);
173 memset(buf, 0, length * sizeof(u32));
174
175 if (!buf) { 174 if (!buf) {
176 dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__); 175 dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
177 return -ENOMEM; 176 return -ENOMEM;