From 5ca2645be45cba11be3d9bdd89166c17128da4f9 Mon Sep 17 00:00:00 2001 From: Michael Adisumarta Date: Wed, 23 Jun 2021 12:56:20 -0700 Subject: [PATCH] msm: ipa: fix the double free for the queue transfer failure Fix the double free cache for the queue transfer failure. Change-Id: Ife6abe3f4c06e6fc5c5ac15544f040d5c8cc831d Signed-off-by: Michael Adisumarta --- drivers/platform/msm/ipa/ipa_v3/ipa_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index a21b8df25b..4081e8a02d 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -649,6 +649,9 @@ int ipa3_send(struct ipa3_sys_context *sys, return 0; +failure_dma_map: + kmem_cache_free(ipa3_ctx->tx_pkt_wrapper_cache, tx_pkt); + failure: ipahal_destroy_imm_cmd(tag_pyld_ret); tx_pkt = tx_pkt_first; @@ -673,9 +676,6 @@ failure: tx_pkt = next_pkt; } -failure_dma_map: - kmem_cache_free(ipa3_ctx->tx_pkt_wrapper_cache, tx_pkt); - spin_unlock_bh(&sys->spinlock); return result; }