USB: remove duplicate out endpoint creation in MTP mode
authorPeter Oh <poh@broadcom.com>
Thu, 12 Sep 2013 01:42:18 +0000 (01:42 +0000)
committerColin Cross <ccross@android.com>
Fri, 20 Sep 2013 04:03:34 +0000 (23:03 -0500)
commit2c7011b8323721307f74cec6eec28430cfee3e7e
treeb39942f432db92e2eac29aa106fc7c6a1e71baf1
parentcf0fad49d17cb8273ce555dd5b7afab67d7923bf
USB: remove duplicate out endpoint creation in MTP mode

Android MTP gadget uses 3 endpoints which are 1 in endpoint,
1 out endpoint, and 1 interrupt endpoint. However when MTP
gadget creates its endpoints, it creates the out endpoint twice
and overwrites the first created out endpoint with the second one,
so that it causes a leak of endpoint resources.

Change-Id: Iba82950095610b26b362f4b10a67cedfb1fee366
Signed-off-by: Peter Oh <poh@broadcom.com>
Reviewed-on: http://mps-gerrit.broadcom.com/37744
Reviewed-by: Graham Williams <gwilli@broadcom.com>
Reviewed-by: John Garry <jgarry@broadcom.com>
Branch-Open: Branch Status <branch_status_noreply@broadcom.com>
Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com>
Reviewed-by: Joyjit Nath <joyjit@broadcom.com>
Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>
drivers/usb/gadget/f_mtp.c