summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2019-08-31 13:18:40 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-09-13 17:36:16 -0500
commit4ce71be67b08d00729f4d8735e2b76d8b5882d2c (patch)
treed12a4e737e43458aba891f3e1d8ab4b8cd26aaf6 /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
parent17da41bf00c849d809cb3cc5eebc43a1924736fd (diff)
drm/amdgpu: check mmhub_funcs pointer before refering to it
mmhub callback functions are not initialized for all the ASICs Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 420dcdd769ff..08a47a5785cd 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -799,7 +799,7 @@ static int gmc_v9_0_ecc_late_init(void *handle)
goto umc_late_fini;
}
- if (adev->mmhub_funcs->ras_late_init) {
+ if (adev->mmhub_funcs && adev->mmhub_funcs->ras_late_init) {
r = adev->mmhub_funcs->ras_late_init(adev);
if (r)
return r;