else switch (ctrl.ioctl_code) { 
else switch (ctl->ioctl_code) { 
static int proc_ioctl (struct dev_state *ps, void __user *arg){	struct usbdevfs_ioctl	ctrl;	int			size;	void			*buf = NULL;	int			retval = 0;	struct usb_interface    *intf = NULL;	struct usb_driver       *driver = NULL;	/* get input parameters and alloc buffer */	if (copy_from_user(&ctrl, arg, sizeof (ctrl)))		return -EFAULT;	if ((size = _IOC_SIZE (ctrl.ioctl_code)) > 0) {		if ((buf = kmalloc (size, GFP_KERNEL)) == NULL)			return -ENOMEM;		if ((_IOC_DIR(ctrl.ioctl_code) & _IOC_WRITE)) {			if (copy_from_user (buf, ctrl.data, size)) {				kfree(buf);				return -EFAULT;			}		} else {			memset (buf, 0, size);		}	}	if (!connected(ps->dev)) {		kfree(buf);		return -ENODEV;	}	if (ps->dev->state != USB_STATE_CONFIGURED)		retval = -EHOSTUNREACH;	else if (!(intf = usb_ifnum_to_if (ps->dev, ctrl.ifno)))               retval = -EINVAL;	else switch (ctrl.ioctl_code) {	/* disconnect kernel driver from interface */	case USBDEVFS_DISCONNECT:		down_write(&usb_bus_type.subsys.rwsem);		if (intf->dev.driver) {			driver = to_usb_driver(intf->dev.driver);			dev_dbg (&intf->dev, "disconnect by usbfs\n");			usb_driver_release_interface(driver, intf);		} else			retval = -ENODATA;		up_write(&usb_bus_type.subsys.rwsem);		break;	/* let kernel drivers try to (re)bind to the interface */	case USBDEVFS_CONNECT:		usb_unlock_device(ps->dev);		usb_lock_all_devices();		bus_rescan_devices(intf->dev.bus);		usb_unlock_all_devices();		usb_lock_device(ps->dev);		break;	/* talk directly to the interface's driver */	default:		down_read(&usb_bus_type.subsys.rwsem);		if (intf->dev.driver)			driver = to_usb_driver(intf->dev.driver);		if (driver == NULL || driver->ioctl == NULL) {			retval = -ENOTTY;		} else {			retval = driver->ioctl (intf, ctrl.ioctl_code, buf);			if (retval == -ENOIOCTLCMD)				retval = -ENOTTY;		}		up_read(&usb_bus_type.subsys.rwsem);	}	/* cleanup and return */	if (retval >= 0			&& (_IOC_DIR (ctrl.ioctl_code) & _IOC_READ) != 0			&& size > 0			&& copy_to_user (ctrl.data, buf, size) != 0)		retval = -EFAULT;	kfree(buf);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c36fc889b5a4fd66cfd9ba80d9e038745d349567/devio.c/buggy/drivers/usb/core/devio.c