From ec3d41727be93b0e03eb6832a696dabc18979818 Mon Sep 17 00:00:00 2001 From: Amrit Date: Wed, 21 Jun 2023 12:43:15 +0530 Subject: [PATCH] qcacmn: Add NULL check before unmapping desc Add NULL check before unmapping desc Change-Id: I633568f66dec04a5591a0161fce04c9392542e57 CRs-Fixed: 3481046 --- dp/wifi3.0/dp_tx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index fe9e0f5233..a7515492a5 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -2125,8 +2125,10 @@ void dp_tx_nbuf_unmap(struct dp_soc *soc, static inline void dp_tx_enh_unmap(struct dp_soc *soc, struct dp_tx_desc_s *desc) { - dp_tx_nbuf_unmap(soc, desc); - desc->flags |= DP_TX_DESC_FLAG_UNMAP_DONE; + if (qdf_likely(!(desc->flags & DP_TX_DESC_FLAG_UNMAP_DONE))) { + dp_tx_nbuf_unmap(soc, desc); + desc->flags |= DP_TX_DESC_FLAG_UNMAP_DONE; + } } static inline void dp_tx_unmap(struct dp_soc *soc, struct dp_tx_desc_s *desc)