]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amdgpu: check mmhub_funcs pointer before refering to it
authorHawking Zhang <Hawking.Zhang@amd.com>
Sat, 31 Aug 2019 05:18:40 +0000 (13:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Sep 2019 22:36:16 +0000 (17:36 -0500)
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>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index 420dcdd769ff27ffee2c3a298b3088a5c0efad99..08a47a5785cd697cacfeea7c18d1e6878d1bc6fe 100644 (file)
@@ -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;