summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2019-09-06 23:23:44 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-09-16 16:59:35 +0200
commit4d1337d2e96715b7882fd75658e54ab59b3f58cd (patch)
tree0464d5c03ec2aa329ad6f4d71cdfc1d7cbb93ed2 /drivers/gpu
parentdrm/amdgpu: cleanup PTE flag generation v3 (diff)
downloadlinux-4d1337d2e96715b7882fd75658e54ab59b3f58cd.tar.xz
linux-4d1337d2e96715b7882fd75658e54ab59b3f58cd.zip
drm/amdgpu: Avoid RAS recovery init when no RAS support.
Fixes driver load regression on APUs. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index e9bd40ea7ce0..e461386d697b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1496,9 +1496,14 @@ out:
int amdgpu_ras_recovery_init(struct amdgpu_device *adev)
{
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
- struct ras_err_handler_data **data = &con->eh_data;
+ struct ras_err_handler_data **data;
int ret;
+ if (con)
+ data = &con->eh_data;
+ else
+ return 0;
+
*data = kmalloc(sizeof(**data), GFP_KERNEL | __GFP_ZERO);
if (!*data) {
ret = -ENOMEM;