aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/amba-pl08x.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-08-05 06:02:44 -0400
committerVinod Koul <vinod.koul@intel.com>2011-09-19 05:43:16 -0400
commitc12056466d76cdff884402d15f077dd0586e5215 (patch)
treeb166b5a86426519859d20978445b4e3390317d8a /drivers/dma/amba-pl08x.c
parentb7f69d9d4283cfbbf7458962cf9bdba6463b831d (diff)
dmaengine/amba-pl08x: Check txd->llis_va before freeing dma_pool
In pl08x_free_txd(), check if pool is allocated successfully before freeing it. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/amba-pl08x.c')
-rw-r--r--drivers/dma/amba-pl08x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 2c390d1b9cad..b7cbd1ab1db1 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -803,7 +803,8 @@ static void pl08x_free_txd(struct pl08x_driver_data *pl08x,
803 struct pl08x_sg *dsg, *_dsg; 803 struct pl08x_sg *dsg, *_dsg;
804 804
805 /* Free the LLI */ 805 /* Free the LLI */
806 dma_pool_free(pl08x->pool, txd->llis_va, txd->llis_bus); 806 if (txd->llis_va)
807 dma_pool_free(pl08x->pool, txd->llis_va, txd->llis_bus);
807 808
808 pl08x->pool_ctr--; 809 pl08x->pool_ctr--;
809 810