diff options
author | Bhaumik Bhatt <bbhatt@codeaurora.org> | 2021-03-29 18:28:18 -0700 |
---|---|---|
committer | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2021-03-31 16:47:07 +0530 |
commit | 418bec695696abd1b4d5abca85f143ead2ffedac (patch) | |
tree | cc0bfa1703624f5ff050cdf43281f89142d96eee /drivers/bus | |
parent | 9e40641f62cd812b21f2c73b5cfb3346eb466dea (diff) | |
download | linux-418bec695696abd1b4d5abca85f143ead2ffedac.tar.gz linux-418bec695696abd1b4d5abca85f143ead2ffedac.tar.bz2 linux-418bec695696abd1b4d5abca85f143ead2ffedac.zip |
bus: mhi: core: Rely on accurate method to determine EDL mode
Relying on the current execution environment to determine if EDL
image was downloaded should not be done as the execution
environment can change at this point in error cases and we may
misread it. Instead, MHI can rely on the local 'fw_name' variable
as a safer alternative.
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/1617067704-28850-2-git-send-email-bbhatt@codeaurora.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/mhi/core/boot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/core/boot.c index 08c28740dc4e..84c21178144a 100644 --- a/drivers/bus/mhi/core/boot.c +++ b/drivers/bus/mhi/core/boot.c @@ -460,7 +460,8 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) goto error_fw_load; } - if (mhi_cntrl->ee == MHI_EE_EDL) { + /* Exit if EDL image was loaded */ + if (fw_name == mhi_cntrl->edl_image) { release_firmware(firmware); return; } |