Commit 9a7d34be authored by Stephen Warren's avatar Stephen Warren Committed by Marek Vasut

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: default avatarStephen Warren <swarren@nvidia.com>
parent bdf81611
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment