usb: gadget: remove driver from pending list on probe error

Retry gadget probe only if the probe result is -EPROBE_DEFER, not on
every probe error.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
Marek Szyprowski 2016-02-08 13:42:14 +01:00 committed by Felipe Balbi
parent bba40e6948
commit 31b994a498

View File

@ -413,9 +413,10 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
if (!driver->udc_name || strcmp(driver->udc_name,
dev_name(&udc->dev)) == 0) {
ret = udc_bind_to_driver(udc, driver);
if (ret != -EPROBE_DEFER)
list_del(&driver->pending);
if (ret)
goto err4;
list_del(&driver->pending);
break;
}
}