mhi: core: Set bhi and bhie to NULL upon power down

Set the bhi and bhie pointers to NULL as part of clean
up. This makes sure that stale pointers are not accessed
in case the bhi or bhie is failed to initialize during
power up.

Change-Id: Iddbd3a8234ff4d384ab03081479d55faf10d9443
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
Hemant Kumar 2020-08-17 13:27:42 -07:00
commit 3e0d1c8b21

View file

@ -1114,6 +1114,10 @@ void mhi_power_down(struct mhi_controller *mhi_cntrl, bool graceful)
}
mhi_deinit_dev_ctxt(mhi_cntrl);
}
/* reset set bhi and bhie to prevent reg access */
mhi_cntrl->bhi = NULL;
mhi_cntrl->bhie = NULL;
}
EXPORT_SYMBOL(mhi_power_down);