diff options
author | Stephen Warren | 2014-06-10 11:02:37 -0600 |
---|---|---|
committer | Marek Vasut | 2014-06-11 02:26:05 +0200 |
commit | 9a7d34be13a6934e0fddfaf12236d8784343f902 (patch) | |
tree | b01b62022367bc0dc2a991e76ee159e6e8dfc302 /drivers | |
parent | bdf81611e444e8aef21cb05eeae69f694c0c7a39 (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index 7a6563f83fd..1428af85cff 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; } |