usb: gadget: fsl_udc: Fix a race between ep_disable and ep_queue
authorBenoit Goby <benoit@android.com>
Fri, 3 Dec 2010 00:11:15 +0000 (16:11 -0800)
committerBenoit Goby <benoit@android.com>
Fri, 3 Dec 2010 22:02:44 +0000 (14:02 -0800)
commit3cf8cfddc7d1f4a2893f9a5d892b1214140c7c00
tree55c978c467ced15cb482b4167a6c487055d02144
parent1538e53fbca5ce8b466ab067ab9c46151f0e51bd
usb: gadget: fsl_udc: Fix a race between ep_disable and ep_queue

Fixed a possible null pointer exception when an endpoint gets
disabled while a request is being enqueued in parallel.

Unmap the request buffer if we fail to enqueue the request.

Change-Id: If94cc278c2e6ab58adcf170511e676348365f3f9
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/fsl_udc_core.c