summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/f_sourcesink.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-11-19 10:02:19 +0300
committerFelipe Balbi <balbi@ti.com>2015-12-15 18:12:41 +0300
commitfa4dce2022241f3c938372af0faf9d263061f6a9 (patch)
tree5dc2be825a5b02663b87abf570e245907557b805 /drivers/usb/gadget/function/f_sourcesink.c
parent0aecfc1b359dffddf74bd0e0ea5ee47066d210ac (diff)
downloadlinux-fa4dce2022241f3c938372af0faf9d263061f6a9.tar.xz
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 <peter.chen@freescale.com> Suggested-by: Krzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_sourcesink.c')
-rw-r--r--drivers/usb/gadget/function/f_sourcesink.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}