On Thu, 27 Aug 2009, Oliver Neukum wrote: > --- a/drivers/usb/core/driver.c > +++ b/drivers/usb/core/driver.c > @@ -236,24 +236,30 @@ static int usb_probe_interface(struct device *dev) > > /* Carry out a deferred switch to altsetting 0 */ > if (intf->needs_altsetting0) { > - usb_set_interface(udev, intf->altsetting[0]. > + error = usb_set_interface(udev, intf->altsetting[0]. > desc.bInterfaceNumber, 0); > + if (error < 0) > + goto err; > + > intf->needs_altsetting0 = 0; > } > > error = driver->probe(intf, id); > - if (error) { > - mark_quiesced(intf); > - intf->needs_remote_wakeup = 0; > - intf->condition = USB_INTERFACE_UNBOUND; > - usb_cancel_queued_reset(intf); > - } else > - intf->condition = USB_INTERFACE_BOUND; > + if (error) > + goto err; > > + intf->condition = USB_INTERFACE_BOUND; > usb_autosuspend_device(udev); > } > > return error; > + > +err: > + mark_quiesced(intf); > + intf->needs_remote_wakeup = 0; > + intf->condition = USB_INTERFACE_UNBOUND; > + usb_cancel_queued_reset(intf); > + return error; Minor problem: You omitted the usb_autosuspend_device() call from the error path. Once that is fixed you can add Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html