diff options
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r-- | drivers/usb/core/message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 2fcc06eb5e60..286b4431a097 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -389,7 +389,6 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, | |||
389 | if (io->entries <= 0) | 389 | if (io->entries <= 0) |
390 | return io->entries; | 390 | return io->entries; |
391 | 391 | ||
392 | io->count = io->entries; | ||
393 | io->urbs = kmalloc(io->entries * sizeof *io->urbs, mem_flags); | 392 | io->urbs = kmalloc(io->entries * sizeof *io->urbs, mem_flags); |
394 | if (!io->urbs) | 393 | if (!io->urbs) |
395 | goto nomem; | 394 | goto nomem; |
@@ -458,6 +457,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, | |||
458 | io->urbs[--i]->transfer_flags &= ~URB_NO_INTERRUPT; | 457 | io->urbs[--i]->transfer_flags &= ~URB_NO_INTERRUPT; |
459 | 458 | ||
460 | /* transaction state */ | 459 | /* transaction state */ |
460 | io->count = io->entries; | ||
461 | io->status = 0; | 461 | io->status = 0; |
462 | io->bytes = 0; | 462 | io->bytes = 0; |
463 | init_completion(&io->complete); | 463 | init_completion(&io->complete); |
@@ -1091,8 +1091,8 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) | |||
1091 | continue; | 1091 | continue; |
1092 | dev_dbg(&dev->dev, "unregistering interface %s\n", | 1092 | dev_dbg(&dev->dev, "unregistering interface %s\n", |
1093 | dev_name(&interface->dev)); | 1093 | dev_name(&interface->dev)); |
1094 | device_del(&interface->dev); | ||
1095 | usb_remove_sysfs_intf_files(interface); | 1094 | usb_remove_sysfs_intf_files(interface); |
1095 | device_del(&interface->dev); | ||
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | /* Now that the interfaces are unbound, nobody should | 1098 | /* Now that the interfaces are unbound, nobody should |