Thread (15 messages) flat view 15 messages, 3 authors, 2021-06-25
STALE1867d LANDED: 2 (0M)

Revision v4 of 4 in this series; 2 review trailers; landed in mainline as 3aa8f43b3368 on 2021-08-05.

Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 current

[PATCH v4 2/6] bus: mhi: core: Set BHI and BHIe pointers to NULL in clean-up

From: Bhaumik Bhatt <hidden>
Date: 2021-05-06 19:52:18
Also in: ath11k, linux-arm-msm, lkml
Subsystem: mhi bus, the rest · Maintainers: Manivannan Sadhasivam, Linus Torvalds

Set the BHI and BHIe pointers to NULL as part of clean-up. This
makes sure that stale pointers are not accessed after powering
MHI down.

Suggested-by: Hemant Kumar <redacted>
Signed-off-by: Bhaumik Bhatt <redacted>
Reviewed-by: Jeffrey Hugo <redacted>
Reviewed-by: Hemant Kumar <redacted>
---
 drivers/bus/mhi/core/init.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index 11c7a3d..1cc2f22 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -1132,6 +1132,9 @@ void mhi_unprepare_after_power_down(struct mhi_controller *mhi_cntrl)
 		mhi_cntrl->rddm_image = NULL;
 	}
 
+	mhi_cntrl->bhi = NULL;
+	mhi_cntrl->bhie = NULL;
+
 	mhi_deinit_dev_ctxt(mhi_cntrl);
 }
 EXPORT_SYMBOL_GPL(mhi_unprepare_after_power_down);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help