[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210802051255.5771-5-manivannan.sadhasivam@linaro.org>
Date: Mon, 2 Aug 2021 10:42:49 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: gregkh@...uxfoundation.org
Cc: hemantk@...eaurora.org, bbhatt@...eaurora.org,
linux-arm-msm@...r.kernel.org, jhugo@...eaurora.org,
linux-kernel@...r.kernel.org, loic.poulain@...aro.org,
Jeffrey Hugo <quic_jhugo@...cinc.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: [PATCH 04/10] bus: mhi: core: Set BHI and BHIe pointers to NULL in clean-up
From: Bhaumik Bhatt <bbhatt@...eaurora.org>
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 <hemantk@...eaurora.org>
Signed-off-by: Bhaumik Bhatt <bbhatt@...eaurora.org>
Reviewed-by: Jeffrey Hugo <quic_jhugo@...cinc.com>
Reviewed-by: Hemant Kumar <hemantk@...eaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Link: https://lore.kernel.org/r/1620330705-40192-3-git-send-email-bbhatt@codeaurora.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
---
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 11c7a3d3c9bf..1cc2f225d3d1 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);
--
2.25.1
Powered by blists - more mailing lists