[PATCH 5.10 277/317] drm/amdgpu: add error handle to avoid out-of-bounds