[PATCH 6.10 195/482] drm/amdgpu: add list empty check to avoid null pointer issue