summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2020-03-24 11:40:46 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-26 15:51:08 +0100
commit93e17a44347acd747a76d63dd9339e48c2c9e308 (patch)
tree0fc963d7eb7e6c189f95f661938c3ff8b3d63e82 /drivers/bus
parent3316ab2b45f6bf4797d8d65b22fda3cc13318890 (diff)
downloadlinux-93e17a44347acd747a76d63dd9339e48c2c9e308.tar.gz
linux-93e17a44347acd747a76d63dd9339e48c2c9e308.tar.bz2
linux-93e17a44347acd747a76d63dd9339e48c2c9e308.zip
bus: mhi: core: Initialize bhie field in mhi_cntrl for RDDM capture
The bhie field in mhi_cntrl needs to be initialized to proper register base in order to make mhi_rddm_prepare() to work. Otherwise, mhi_rddm_prepare() will cause NULL pointer dereference. Fixes: 6fdfdd27328c ("bus: mhi: core: Add support for downloading RDDM image during panic") Reported-by: Hemant Kumar <hemantk@codeaurora.org> Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20200324061050.14845-4-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/mhi/core/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index d136f6c6ca78..f6e3c16225a7 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -979,7 +979,8 @@ int mhi_prepare_for_power_up(struct mhi_controller *mhi_cntrl)
goto bhie_error;
}
- memset_io(mhi_cntrl->regs + bhie_off + BHIE_RXVECADDR_LOW_OFFS,
+ mhi_cntrl->bhie = mhi_cntrl->regs + bhie_off;
+ memset_io(mhi_cntrl->bhie + BHIE_RXVECADDR_LOW_OFFS,
0, BHIE_RXVECSTATUS_OFFS - BHIE_RXVECADDR_LOW_OFFS +
4);