mhi: core: Add NULL check in mhi_get_exec_env
In case power up failed due to incorrect bhi offset
bhi pointer in mhi controller remains NULL. Later if
MHI controller forces RDDM it checks the execution
environment by accessing the BHI offset. This results
into NULL pointer dereference. Fix this by adding NULL
check for both mhi controller and bhi pointer before
reading the BHI offset.
Change-Id: I93f8918d7d595a77a5c8bcb6fd610f1a2b484fc4
Signed-off-by:
Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment