Re: [PATCH v2 4/4] usb: gadget: f_sourcesink: quit if usb_ep_queue returns error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 11/19/2015 08:02 AM, Peter Chen wrote:
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@xxxxxxxxxxxxx>
Suggested-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx>

Reviewed-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx>

---
  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 9df4aa1..807af32 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -635,6 +635,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;
  		}
  	}



Best regards,
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux