summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-06-10 11:02:37 -0600
committerMarek Vasut <marex@denx.de>2014-06-11 02:26:05 +0200
commit9a7d34be13a6934e0fddfaf12236d8784343f902 (patch)
treeb01b62022367bc0dc2a991e76ee159e6e8dfc302 /drivers
parentbdf81611e444e8aef21cb05eeae69f694c0c7a39 (diff)
downloadu-boot-imx-9a7d34be13a6934e0fddfaf12236d8784343f902.zip
u-boot-imx-9a7d34be13a6934e0fddfaf12236d8784343f902.tar.gz
u-boot-imx-9a7d34be13a6934e0fddfaf12236d8784343f902.tar.bz2
usb: ci_udc: fix probe error cleanup
If allocation of the ep0 req fails, clean up all the allocations that were made in ci_udc_probe(). Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/ci_udc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 7a6563f..1428af8 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -826,6 +826,7 @@ static int ci_udc_probe(void)
ci_ep_alloc_request(&controller.ep[0].ep, 0);
if (!controller.ep0_req) {
+ free(controller.items_mem);
free(controller.epts);
return -ENOMEM;
}