diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-02-08 12:42:14 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-02-23 06:51:37 (GMT) |
commit | 31b994a4986dcdd664c597afcef2c0918763019a (patch) | |
tree | e71ac280b59baa997399b214a99b6156f64a9185 /drivers | |
parent | bba40e6948b94cba71965285fbac31bd078c024a (diff) | |
download | linux-31b994a4986dcdd664c597afcef2c0918763019a.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/udc/udc-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index fd73a3e..b86a6f0 100644 --- a/drivers/usb/gadget/udc/udc-core.c +++ b/drivers/usb/gadget/udc/udc-core.c @@ -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; } } |