lkml.org 
[lkml]   [2011]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC patch] DMAengine/Langwell: put tx descriptor in error path
From
Date
On Tue, 2011-07-26 at 20:43 +0800, Hillf Danton wrote:
> When preparing LLI based periphral transfer, if error encountered, the newly
> prepared tx descriptor should be put for later recycling.
>
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> drivers/dma/intel_mid_dma.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
> index f653517..b78a65a 100644
> --- a/drivers/dma/intel_mid_dma.c
> +++ b/drivers/dma/intel_mid_dma.c
> @@ -793,6 +793,7 @@ static struct dma_async_tx_descriptor
> *intel_mid_dma_prep_slave_sg(
> 32, 0);
This looks like a corrupt patch, can you fix this
> if (NULL == desc->lli_pool) {
> pr_err("MID_DMA:LLI pool create failed\n");
> + midc_desc_put(midc, desc);
> return NULL;
> }
>
> @@ -800,6 +801,7 @@ static struct dma_async_tx_descriptor
> *intel_mid_dma_prep_slave_sg(
> if (!desc->lli) {
> pr_err("MID_DMA: LLI alloc failed\n");
> pci_pool_destroy(desc->lli_pool);
> + midc_desc_put(midc, desc);
> return NULL;
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


--
~Vinod



\
 
 \ /
  Last update: 2011-08-08 19:03    [W:0.045 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site