Variable udc is used unitialized for DBG(xxx). Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx> --- drivers/usb/gadget/at91_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index a11379c..acd9e44 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -414,6 +414,8 @@ static int at91_ep_queue(struct usb_ep *_ep, req = container_of(_req, struct at91_request, req); ep = container_of(_ep, struct at91_ep, ep); + udc = ep->udc; + if (!_req || !_req->complete || !_req->buf || !list_empty(&req->queue)) { DBG(udc, "invalid request\n"); @@ -425,8 +427,6 @@ static int at91_ep_queue(struct usb_ep *_ep, return -EINVAL; } - udc = ep->udc; - if (!udc || !udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { DBG(udc, "invalid device\n"); return -EINVAL; -- 1.8.1.5 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox