drm/amdgpu: avoid null pointer dereference
authorGuchun Chen <guchun.chen@amd.com>
Tue, 17 Sep 2019 09:49:29 +0000 (17:49 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:10:59 +0000 (09:10 -0500)
commit8a3e801f1924c07781e93f043a74cfa244451787
treeffa20dffa9313914483d1f6f8f018c51b972caae
parentf256ba473ea82f16be657752d7d5cf7e75164085
drm/amdgpu: avoid null pointer dereference

null ptr should be checked first to avoid null ptr access

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c