diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-02-08 13:42:14 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-02-23 08:51:37 +0200 |
commit | 31b994a4986dcdd664c597afcef2c0918763019a (patch) | |
tree | e71ac280b59baa997399b214a99b6156f64a9185 /drivers | |
parent | bba40e6948b94cba71965285fbac31bd078c024a (diff) | |
download | linux-31b994a4986dcdd664c597afcef2c0918763019a.tar.bz2 |
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 fd73a3ea07c2..b86a6f03592e 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; } } |