aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/keyspan.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 15:29:43 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:59 -0500
commit80b6ca48321974a6566a1c9048ba34f60420bca6 (patch)
treea350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/serial/keyspan.c
parentd54a5cb6484705f7808b337917cc7598f2f971c3 (diff)
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/keyspan.c')
-rw-r--r--drivers/usb/serial/keyspan.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 3b958e60f5e8..052b735c4fbd 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -2250,12 +2250,11 @@ static int keyspan_startup (struct usb_serial *serial)
2250 } 2250 }
2251 2251
2252 /* Setup private data for serial driver */ 2252 /* Setup private data for serial driver */
2253 s_priv = kmalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL); 2253 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
2254 if (!s_priv) { 2254 if (!s_priv) {
2255 dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__); 2255 dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__);
2256 return -ENOMEM; 2256 return -ENOMEM;
2257 } 2257 }
2258 memset(s_priv, 0, sizeof(struct keyspan_serial_private));
2259 2258
2260 s_priv->device_details = d_details; 2259 s_priv->device_details = d_details;
2261 usb_set_serial_data(serial, s_priv); 2260 usb_set_serial_data(serial, s_priv);
@@ -2263,12 +2262,11 @@ static int keyspan_startup (struct usb_serial *serial)
2263 /* Now setup per port private data */ 2262 /* Now setup per port private data */
2264 for (i = 0; i < serial->num_ports; i++) { 2263 for (i = 0; i < serial->num_ports; i++) {
2265 port = serial->port[i]; 2264 port = serial->port[i];
2266 p_priv = kmalloc(sizeof(struct keyspan_port_private), GFP_KERNEL); 2265 p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL);
2267 if (!p_priv) { 2266 if (!p_priv) {
2268 dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i); 2267 dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i);
2269 return (1); 2268 return (1);
2270 } 2269 }
2271 memset(p_priv, 0, sizeof(struct keyspan_port_private));
2272 p_priv->device_details = d_details; 2270 p_priv->device_details = d_details;
2273 usb_set_serial_port_data(port, p_priv); 2271 usb_set_serial_port_data(port, p_priv);
2274 } 2272 }