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>
This commit is contained in:

committed by
Alex Deucher

parent
17da41bf00
commit
4ce71be67b
@@ -799,7 +799,7 @@ static int gmc_v9_0_ecc_late_init(void *handle)
|
|||||||
goto umc_late_fini;
|
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);
|
r = adev->mmhub_funcs->ras_late_init(adev);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
Reference in New Issue
Block a user