Fix printing empty string array.
Signed-off-by: YiPeng Chai <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index c571f0d95994..d04fc0f19a29 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -128,8 +128,9 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device
*adev,
"for process %s pid %d thread %s pid %d)\n",
entry->vmid_src ? "mmhub" : "gfxhub",
entry->src_id, entry->ring_id, entry->vmid,
- entry->pasid, task_info.process_name, task_info.tgid,
- task_info.task_name, task_info.pid);
+ entry->pasid,
+ task_info.process_name[0] ? task_info.process_name :
"NULL", task_info.tgid,
+ task_info.task_name[0] ? task_info.task_name : "NULL",
task_info.pid);
dev_err(adev->dev, " in page starting at address 0x%016llx
from client %d\n",
addr, entry->client_id);
if (!amdgpu_sriov_vf(adev))
--
2.34.1