drm/amdgpu: return early on error while setting bar0 memtype
authorNirmoy Das <nirmoy.das@amd.com>
Fri, 29 Oct 2021 14:06:04 +0000 (16:06 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Nov 2021 21:58:04 +0000 (16:58 -0500)
commit26db557e35d6b229b31078ebd6939b4cad936f6f
tree37c3f095ed9cc1c77b1f423ba2b2b6bef9fe1356
parentd5a28852e86ef486ee34e4cf72e8ad99a36f4fc3
drm/amdgpu: return early on error while setting bar0 memtype

We set WC memtype for aper_base but don't check return value
of arch_io_reserve_memtype_wc(). Be more defensive and return
early on error.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c