diff options
author | Bhaumik Bhatt <bbhatt@codeaurora.org> | 2021-02-10 18:17:12 -0800 |
---|---|---|
committer | Loic Poulain <loic.poulain@linaro.org> | 2021-03-01 16:49:08 +0100 |
commit | 945ad75b91586bd6d738a32c95067023fc7ceb76 (patch) | |
tree | cdfdd39eab04ca67a40c7a7004241ce1ae2e2b5a | |
parent | 6bc6dcdc7fe453a3df46a6f265769013b4872755 (diff) |
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>
-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 b91c7b397288..2a604d62b576 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; } |