gunyah: secure_vm_loader: Don't release the memory when VM load fail

When gh_vm_loader_sec_load fail, we shouldn't release
the CMA memory.Because hyp not reclaim the memory and
hyp assgin the VM memory to HLOS.

Change-Id: If575cadd491335b441a328656876e664e4fc18a9
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
This commit is contained in:
Peng Yang 2022-07-14 10:50:50 +08:00
parent 51372d1749
commit d19ea08a70

View File

@ -255,8 +255,6 @@ static int gh_sec_vm_loader_load_fw(struct gh_sec_vm_dev *vm_dev,
if (ret) {
dev_err(dev, "Loading Secure VM %s failed %d\n",
vm_dev->vm_name, ret);
if (!vm_dev->is_static)
dma_free_coherent(dev, vm_dev->fw_size, virt, dma_handle);
return ret;
}