From: Ira Snyder Date: Fri, 15 May 2009 16:59:46 +0000 (-0700) Subject: fsldma: fix memory leak on error path in fsl_dma_prep_memcpy() X-Git-Tag: v2.6.30-rc8~14^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e077f8e8337e52eef3c39c24c31e103b11a0326;p=pandora-kernel.git fsldma: fix memory leak on error path in fsl_dma_prep_memcpy() 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 Signed-off-by: Li Yang --- Reading git-diff-tree failed