usb:langwell_ude: Check ep desc to guarantee it is not disabled
authorfeng wang <feng.a.wang@intel.com>
Fri, 3 Feb 2012 06:07:57 +0000 (14:07 +0800)
committerbuildbot <buildbot@intel.com>
Fri, 10 Feb 2012 04:41:48 +0000 (20:41 -0800)
commitd3b9f0262bcc0782ea471eb155fe92a0b660a128
treee2d805ae975e648325665964cb68ecde0fa74529
parentebd7262b2e2f1e00c3d0ad3079d96d05730c40d2
usb:langwell_ude: Check ep desc to guarantee it is not disabled

BZ: 20895

A panic is raised in langwell_irq as ep->desc is set to NULL.
In langwell_ep_disable, ep is disabled and spin_lock get unlocked
in langwell_irq to handle the trans complete. In function done,
ep->desc is accessed and we meet NULL pointer. Function done will
be skipped as it is called in nuke to release resources. So no leakage.

Change-Id: I0c72ad83e12b6e61e04128dbafb492417eb1de01
Signed-off-by: feng wang <feng.a.wang@intel.com>
Reviewed-on: http://android.intel.com:8080/33821
Reviewed-by: Zhuang, Jin Can <jin.can.zhuang@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/usb/gadget/langwell_udc.c