aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/message.c
diff options
context:
space:
mode:
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;