usb:gadget: cancel pending control request after disconnection
authorjzhuan5 <jin.can.zhuang@intel.com>
Wed, 11 Apr 2012 17:45:47 +0000 (13:45 -0400)
committerbuildbot <buildbot@intel.com>
Wed, 18 Apr 2012 10:04:29 +0000 (03:04 -0700)
commit198461c4833680ac36d2333d4ea27ab1c703eca6
treeab687f856acf33840dd5078ea8004bf6a412e9c3
parent292b4df11d2dd3cbaa0a3ad8694bfa05c4a034e3
usb:gadget: cancel pending control request after disconnection

BZ: 30958

Control requests can be pending on ep0IN after disconnection, after re-connection,
the request completes but the gadget (e.g. RNDIS) is already removed, this causes
NULL pointer issue. The patch removes the pending control request after disconnection.

Change-Id: Ifc9dc823ab550c0451667128c78c6f2ecebe1c4c
Signed-off-by: jzhuan5 <jin.can.zhuang@intel.com>
Reviewed-on: http://android.intel.com:8080/43029
Reviewed-by: Wu, Hao <hao.wu@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/usb/gadget/android.c