aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-hcd.c3
-rw-r--r--drivers/usb/host/sl811_cs.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 2038125b7f8c..6edf4097d2d2 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -171,11 +171,10 @@ static int ohci_urb_enqueue (
171 } 171 }
172 172
173 /* allocate the private part of the URB */ 173 /* allocate the private part of the URB */
174 urb_priv = kmalloc (sizeof (urb_priv_t) + size * sizeof (struct td *), 174 urb_priv = kzalloc (sizeof (urb_priv_t) + size * sizeof (struct td *),
175 mem_flags); 175 mem_flags);
176 if (!urb_priv) 176 if (!urb_priv)
177 return -ENOMEM; 177 return -ENOMEM;
178 memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *));
179 INIT_LIST_HEAD (&urb_priv->pending); 178 INIT_LIST_HEAD (&urb_priv->pending);
180 urb_priv->length = size; 179 urb_priv->length = size;
181 urb_priv->ed = ed; 180 urb_priv->ed = ed;
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 2d0e73b20099..5da63f535005 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -278,10 +278,9 @@ static int sl811_cs_probe(struct pcmcia_device *link)
278{ 278{
279 local_info_t *local; 279 local_info_t *local;
280 280
281 local = kmalloc(sizeof(local_info_t), GFP_KERNEL); 281 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
282 if (!local) 282 if (!local)
283 return -ENOMEM; 283 return -ENOMEM;
284 memset(local, 0, sizeof(local_info_t));
285 local->p_dev = link; 284 local->p_dev = link;
286 link->priv = local; 285 link->priv = local;
287 286