diff options
author | Rob Herring <robh@kernel.org> | 2015-07-24 10:14:21 -0500 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-07-24 22:08:38 +0200 |
commit | 58d6d139c3e7bb923029e7ba18bfec7f420ead0f (patch) | |
tree | a4c59e5fe253f4f535e90e174a8f6b728dfd8f73 /drivers/usb/gadget/bcm_udc_otg.h | |
parent | 85a9ea314e36fc42656bc93c9e3d83d58b595d3e (diff) | |
download | u-boot-imx-58d6d139c3e7bb923029e7ba18bfec7f420ead0f.zip u-boot-imx-58d6d139c3e7bb923029e7ba18bfec7f420ead0f.tar.gz u-boot-imx-58d6d139c3e7bb923029e7ba18bfec7f420ead0f.tar.bz2 |
usb: ci_udc: fix request allocation when endpoints are disabled
The ci_udc driver request allocation assumes that the endpoint descriptor
pointer is set to retrieve the endpoint number, but that is only true
when the endpoint is enabled. This results in a NULL ptr dereference
which for me happens to return 0 value. This causes the EP0 request
struct to be returned for other endpoints. Some gadget drivers like
fastboot and USB MS work fine, but ethernet does not.
Really, the ci_udc driver is the oddball here doing this EP0 special
case handling Stephen added. All the other drivers alloc/free functions
are pretty much the same with the only variation being the size of the
private struct. This could all be consolidated to a common function.
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/usb/gadget/bcm_udc_otg.h')
0 files changed, 0 insertions, 0 deletions