When no udc is registered it is clearly an error when usb_gadget_poll is called. Let the upper layers know that. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/usb/gadget/at91_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 6eeef7d..8ef1ad0 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1327,7 +1327,7 @@ int usb_gadget_poll(void) u32 value; if (!udc->udp_baseaddr) - return 0; + return -ENODEV; value = gpio_get_value(udc->board.vbus_pin); value ^= udc->board.vbus_active_low; -- 1.8.5.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox