drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv

commit b42fee5e0b 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-07 08:59:13 -05:00 • committed by Greg Kroah-Hartman
commit d07d152d76