drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21

commit 2915e43a03 upstream.

Properly skip non-existent registers as well.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alex Deucher 2023-03-06 10:35:34 -05:00 • committed by Greg Kroah-Hartman
commit a11e210dc5