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>
此提交包含在:
Viresh Kumar
2011-08-05 15:32:44 +05:30
提交者 Vinod Koul
父節點 b7f69d9d42
當前提交 c12056466d

查看文件

@@ -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--;