Jelajahi Sumber

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 <[email protected]>
Michael Adisumarta 3 tahun lalu
induk
melakukan
5ca2645be4
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

+ 3 - 3
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;
 }