diff options
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c145e1ed8429..ece52a6328b5 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1141,12 +1141,11 @@ static int ftdi_sio_attach (struct usb_serial *serial) | |||
1141 | 1141 | ||
1142 | dbg("%s",__FUNCTION__); | 1142 | dbg("%s",__FUNCTION__); |
1143 | 1143 | ||
1144 | priv = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL); | 1144 | priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); |
1145 | if (!priv){ | 1145 | if (!priv){ |
1146 | err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private)); | 1146 | err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private)); |
1147 | return -ENOMEM; | 1147 | return -ENOMEM; |
1148 | } | 1148 | } |
1149 | memset(priv, 0, sizeof(*priv)); | ||
1150 | 1149 | ||
1151 | spin_lock_init(&priv->rx_lock); | 1150 | spin_lock_init(&priv->rx_lock); |
1152 | init_waitqueue_head(&priv->delta_msr_wait); | 1151 | init_waitqueue_head(&priv->delta_msr_wait); |