aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-22 11:16:31 +0100
committerMark Brown <broonie@linaro.org>2013-07-22 11:16:31 +0100
commitc04ee7fcbfba1471af90cf6407370efc779c1243 (patch)
treec0c37c40beb8bd197b7f424a67f12487960c4882 /drivers/usb/host/xhci-mem.c
parente0749524b57019f480ad6c581431589d053e0cb0 (diff)
parent0f4a56e16d5fc9028b62ba529177a3109513e111 (diff)
Merge tag 'v3.10.2' into linux-linaro-lsklsk
This is the 3.10.2 stable release
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index fbf75e57628..f2e57a1112c 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -369,6 +369,10 @@ static struct xhci_container_ctx *xhci_alloc_container_ctx(struct xhci_hcd *xhci
ctx->size += CTX_SIZE(xhci->hcc_params);
ctx->bytes = dma_pool_alloc(xhci->device_pool, flags, &ctx->dma);
+ if (!ctx->bytes) {
+ kfree(ctx);
+ return NULL;
+ }
memset(ctx->bytes, 0, ctx->size);
return ctx;
}