Skip to content

Commit

Permalink
dmaengine/amba-pl08x: Check txd->llis_va before freeing dma_pool
Browse files Browse the repository at this point in the history
In pl08x_free_txd(), check if pool is allocated successfully before freeing it.

Signed-off-by: Viresh Kumar <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
Viresh Kumar authored and Vinod Koul committed Sep 19, 2011
1 parent b7f69d9 commit c120564
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/dma/amba-pl08x.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,8 @@ static void pl08x_free_txd(struct pl08x_driver_data *pl08x,
struct pl08x_sg *dsg, *_dsg;

/* Free the LLI */
dma_pool_free(pl08x->pool, txd->llis_va, txd->llis_bus);
if (txd->llis_va)
dma_pool_free(pl08x->pool, txd->llis_va, txd->llis_bus);

pl08x->pool_ctr--;

Expand Down

0 comments on commit c120564

Please sign in to comment.