[PATCH] drm/amdgpu: Fix NULL pointer when ta is missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ta is optional, so check if ta firmware is loaded or not.

 

Signed-off-by: xinhui pan <xinhui.pan@xxxxxxx>

---

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++

1 file changed, 3 insertions(+)

 

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 7e3e1d588d74..0bd9df9fd289 100644

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

@@ -656,6 +656,9 @@ static int psp_ras_initialize(struct psp_context *psp)

{

             int ret;

+            if (!psp->adev->psp.ta_fw)

+                           return -ENOENT;

+

             if (!psp->ras.ras_initialized) {

                            ret = psp_ras_init_shared_buf(psp);

                            if (ret)

--

2.17.1

 

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux