9
0
Fork 0

USB gadget: at91: return error when no udc is registered

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@pengutronix.de>
This commit is contained in:
Sascha Hauer 2014-02-13 10:33:13 +01:00
parent 4f2f9150b7
commit 1a3315ad7d
1 changed files with 1 additions and 1 deletions

View File

@ -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;