aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/message.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-10-24 15:38:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 19:47:51 -0400
commit0a1ef3b5a765a6f20e7b8caf295aad3276243966 (patch)
tree31d2bc231306e3ed6ed81512e460e32d00bfc730 /drivers/usb/core/message.c
parentb724ae77969fd832be71419dca74bece9af287ff (diff)
[PATCH] usbcore: Use kzalloc instead of kmalloc/memset
This patch (as590) fixes up all the remaining places where usbcore can use kzalloc rather than kmalloc/memset. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r--drivers/usb/core/message.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 5ad0d5e28119..3519f317898e 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1350,7 +1350,7 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
1350 } 1350 }
1351 1351
1352 for (; n < nintf; ++n) { 1352 for (; n < nintf; ++n) {
1353 new_interfaces[n] = kmalloc( 1353 new_interfaces[n] = kzalloc(
1354 sizeof(struct usb_interface), 1354 sizeof(struct usb_interface),
1355 GFP_KERNEL); 1355 GFP_KERNEL);
1356 if (!new_interfaces[n]) { 1356 if (!new_interfaces[n]) {
@@ -1391,7 +1391,6 @@ free_interfaces:
1391 struct usb_host_interface *alt; 1391 struct usb_host_interface *alt;
1392 1392
1393 cp->interface[i] = intf = new_interfaces[i]; 1393 cp->interface[i] = intf = new_interfaces[i];
1394 memset(intf, 0, sizeof(*intf));
1395 intfc = cp->intf_cache[i]; 1394 intfc = cp->intf_cache[i];
1396 intf->altsetting = intfc->altsetting; 1395 intf->altsetting = intfc->altsetting;
1397 intf->num_altsetting = intfc->num_altsetting; 1396 intf->num_altsetting = intfc->num_altsetting;