drm/amdkfd: Fix NULL pointer dereference for set_scratch_backing_va()
authorYong Zhao <Yong.Zhao@amd.com>
Wed, 18 Sep 2019 22:17:57 +0000 (18:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:11:01 +0000 (09:11 -0500)
commitc637b36aeac11685a8258f9bcd667dcc06f6951a
treefb7927907e07fd4bef072eb10c33a1bbe132bd72
parent424b5442a2a67ba369839455c3b1fb1b00c6d861
drm/amdkfd: Fix NULL pointer dereference for set_scratch_backing_va()

Currently this function pointer is missing for GFX10. Considering it is
a void function since GFX9, fix it by checking the function pointer
before dereferencing it.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/include/kgd_kfd_interface.h