Skip to content
Commit 2e077f8e authored by Ira Snyder's avatar Ira Snyder Committed by Li Yang
Browse files

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: default avatarIra W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
parent 776c8943
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment