gpu: nvgpu: re-initialize fw pointer when failed to load fw

When ACR and PMU BL fail to boot, the firmware are releasd, but the
firmware pointers are not re-initialized. That causes later invalid
pointer usage. Fix that by setting them as NULL.

Bug 200462464

Change-Id: Iacdf4b3c7f7144a77f595c77e6f5a29d35505672
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1941671
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vince Hsu
2018-11-02 15:29:29 +08:00
committed by mobile promotions
parent 0bda191d7b
commit 3a87a0c998

View File

@@ -1172,6 +1172,7 @@ err_free_ucode:
nvgpu_dma_free(g, &hs_bl->hs_bl_ucode); nvgpu_dma_free(g, &hs_bl->hs_bl_ucode);
err_done: err_done:
nvgpu_release_firmware(g, hs_bl_fw); nvgpu_release_firmware(g, hs_bl_fw);
acr_desc->acr_hs_bl.hs_bl_fw = NULL;
return err; return err;
} }
@@ -1342,7 +1343,7 @@ err_free_ucode_map:
nvgpu_dma_unmap_free(vm, acr_ucode_mem); nvgpu_dma_unmap_free(vm, acr_ucode_mem);
err_release_acr_fw: err_release_acr_fw:
nvgpu_release_firmware(g, acr_fw); nvgpu_release_firmware(g, acr_fw);
acr_fw = NULL; acr_desc->acr_fw = NULL;
return status; return status;
} }