static LIST_HEAD(udc_list);
add:
list_add_tail(&udc->list, &udc_list);
fix:
list_for_each_entry(udc, &udc_list, list) {
ret = strcmp(name, dev_name(&udc->dev));
if (!ret)
break;
}
if (ret) {
ret = -ENODEV;
goto out;
}
if (udc->driver) {
ret = -EBUSY;
goto out;
}
remove:
list_del(&udc->list);