mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
9e40641f62
commit
418bec6956
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue