fsldma: fix memory leak on error path in fsl_dma_prep_memcpy()
authorIra Snyder <iws@ovro.caltech.edu>
Fri, 15 May 2009 16:59:46 +0000 (09:59 -0700)
committerLi Yang <leoli@freescale.com>
Fri, 22 May 2009 08:54:42 +0000 (16:54 +0800)
When preparing a memcpy operation, if the kernel fails to allocate memory
for a link descriptor after the first link descriptor has already been
allocated, then some memory will never be released. Fix the problem by
walking the list of allocated descriptors backwards, and freeing the
allocated descriptors back into the DMA pool.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Li Yang <leoli@freescale.com>

No differences found