xhci: check for failed dma pool allocation
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 17 Jun 2013 16:56:33 +0000 (09:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jul 2013 01:19:01 +0000 (18:19 -0700)
commitd1fc72e98503dcfeeab1d5463b00a65b1e5d574e
tree53259f5fd132c0263b70e12a572d8439a8f28097
parentee093f6edc6ade788cb55a325dc42728c8b7f4d0
xhci: check for failed dma pool allocation

commit 025f880cb2e4d7218d0422d4b07bea1a68959c38 upstream.

Fail and free the container context in case dma_pool_alloc() can't allocate
the raw context data part of it

This patch should be backported to kernels as old as 2.6.31, that
contain the commit d115b04818e57bdbc7ccde4d0660b15e33013dc8 "USB: xhci:
Support for 64-byte contexts".

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: John Youn <johnyoun@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c