usb: gadget: f_sourcesink: quit if usb_ep_queue returns error
authorPeter Chen <peter.chen@freescale.com>
Thu, 19 Nov 2015 07:02:19 +0000 (15:02 +0800)
committerFelipe Balbi <balbi@ti.com>
Tue, 15 Dec 2015 15:12:41 +0000 (09:12 -0600)
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>
drivers/usb/gadget/function/f_sourcesink.c

index 12e3eb4ee140e018653c4af3aebf2eedf2ae9a04..242ba5caffe5898a2f4922c848d8ae1f2e264cad 100644 (file)
@@ -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;
                }
        }