Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1205646 authored by Viresh Kumar's avatar Viresh Kumar Committed by Vinod Koul
Browse files

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: default avatarViresh Kumar <viresh.kumar@st.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent b7f69d9d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -803,6 +803,7 @@ static void pl08x_free_txd(struct pl08x_driver_data *pl08x,
	struct pl08x_sg *dsg, *_dsg;

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

	pl08x->pool_ctr--;