From: Peter Chen Date: Thu, 19 Nov 2015 07:02:19 +0000 (+0800) Subject: usb: gadget: f_sourcesink: quit if usb_ep_queue returns error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa4dce2022241f3c938372af0faf9d263061f6a9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; } }