sysfs_remove_group(kobj, endpoint->attr_group); kfree(endpoint->attr_group); kfree(endpoint->attr_name); for (i = 0; i < endpoint->num_attrs; ++i) kfree(endpoint->attrs[i]); kfree(endpoint->attrs);
if (endpoint->kobj) { kobject_del(endpoint->kobj); kobject_put(endpoint->kobj); endpoint->kobj = NULL; }
static void usb_remove_ep_files(struct kobject *kobj, struct usb_host_endpoint *endpoint){	int i;	sysfs_remove_group(kobj, endpoint->attr_group);	kfree(endpoint->attr_group);	kfree(endpoint->attr_name);	for (i = 0; i < endpoint->num_attrs; ++i)		kfree(endpoint->attrs[i]);	kfree(endpoint->attrs);}