summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc
diff options
context:
space:
mode:
authorDejin Zheng <zhengdejin5@gmail.com>2020-01-04 16:27:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-15 12:39:21 +0300
commit1d039a80613dd8b8d95e181f918db5004bd5cc48 (patch)
tree92bd5cdc9272f8cd9ea16ca98608a82b8cb1c882 /drivers/usb/gadget/udc
parent463f67aec2837f981b0a0ce8617721ff59685c00 (diff)
downloadlinux-1d039a80613dd8b8d95e181f918db5004bd5cc48.tar.xz
usb: gadget: udc: core: Warn about failed to find udc
If we do not warn here, the user may not know failed to find udc device by a gadget driver with the same name because it silently fails. Let's print a warning in that case so developers find these problems faster. Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r--drivers/usb/gadget/udc/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 51fa614b4079..9b11046480fe 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -1414,6 +1414,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver)
}
mutex_unlock(&udc_lock);
+ if (ret)
+ pr_warn("udc-core: couldn't find an available UDC or it's busy\n");
return ret;
found:
ret = udc_bind_to_driver(udc, driver);