 err2: usb_disconnect (&hcd->self.root_hub); err1: usb_put_dev (root); hcd->state = HC_STATE_QUIESCING; return retval; 
static int dummy_start (struct usb_hcd *hcd){	struct dummy		*dum;	struct usb_device	*root;	int			retval;	dum = hcd_to_dummy (hcd);	/*	 * MASTER side init ... we emulate a root hub that'll only ever	 * talk to one device (the slave side).  Also appears in sysfs,	 * just like more familiar pci-based HCDs.	 */	spin_lock_init (&dum->lock);	init_timer (&dum->timer);	dum->timer.function = dummy_timer;	dum->timer.data = (unsigned long) dum;	INIT_LIST_HEAD (&dum->urbp_list);	root = usb_alloc_dev (NULL, &hcd->self, 0);	if (!root)		return -ENOMEM;	/* only show a low-power port: just 8mA */	hcd->power_budget = 8;	/* root hub enters addressed state... */	hcd->state = HC_STATE_RUNNING;	root->speed = USB_SPEED_HIGH;	/* ...then configured, so khubd sees us. */	if ((retval = usb_hcd_register_root_hub (root, hcd)) != 0) {		goto err1;	}	if ((retval = dummy_register_udc (dum)) != 0)		goto err2;	/* FIXME 'urbs' should be a per-device thing, maybe in usbcore */	device_create_file (dummy_dev(dum), &dev_attr_urbs);	return 0; err2:	usb_disconnect (&hcd->self.root_hub); err1:	usb_put_dev (root);	hcd->state = HC_STATE_QUIESCING;	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/247f3105636caa9d1d8a4c3dfb755de42633bc80/dummy_hcd.c/buggy/drivers/usb/gadget/dummy_hcd.c