Add ta initialization failure check condition.
Signed-off-by: YiPeng Chai <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c
index 468a67b302d4..049d34fd5ba0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c
@@ -220,7 +220,7 @@ static ssize_t ta_if_load_debugfs_write(struct file *fp,
const char *buf, size_t
}
ret = psp_fn_ta_initialize(psp);
- if (ret || context->resp_status) {
+ if (ret || context->resp_status || !context->initialized) {
dev_err(adev->dev, "Failed to load TA via debugfs (%d) and
status (0x%X)\n",
ret, context->resp_status);
if (!ret)
--
2.34.1