Browse Source

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>
Peter Chen 9 years ago
parent
commit
fa4dce2022
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/usb/gadget/function/f_sourcesink.c

+ 1 - 0
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",
 			      is_iso ? "ISO-" : "", is_in ? "IN" : "OUT",
 			      ep->name, status);
 			      ep->name, status);
 			free_ep_req(ep, req);
 			free_ep_req(ep, req);
+			return status;
 		}
 		}
 	}
 	}