From fa4dce2022241f3c938372af0faf9d263061f6a9 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Thu, 19 Nov 2015 15:02:19 +0800 Subject: [PATCH] usb: gadget: f_sourcesink: quit if usb_ep_queue returns error Since now, we may have more than one request during the test, and it is better we just quit once the error occurs instead of try queueing further requests. Signed-off-by: Peter Chen Suggested-by: Krzysztof Opasiak Reviewed-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_sourcesink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c index 12e3eb4ee140..242ba5caffe5 100644 --- a/drivers/usb/gadget/function/f_sourcesink.c +++ b/drivers/usb/gadget/function/f_sourcesink.c @@ -629,6 +629,7 @@ static int source_sink_start_ep(struct f_sourcesink *ss, bool is_in, is_iso ? "ISO-" : "", is_in ? "IN" : "OUT", ep->name, status); free_ep_req(ep, req); + return status; } } -- 2.20.1