aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-11-06 16:18:59 +1000
committerDave Airlie <airlied@redhat.com>2017-11-06 16:18:59 +1000
commit8a6fb5b5823d863b07f670dc9e791d4622d5b7e9 (patch)
treedc853580b18fedbdaa6f79d1d9cdd9b7495fed08 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parent36a5fdf76d3281345e000e115f33817570a76420 (diff)
parent767601d100a53e653233aebca7c262ce0addfa99 (diff)
Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
some more amd/ttm fixes. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/ttm: Downgrade pr_err to pr_debug for memory allocation failures drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list drm/amd/amdgpu: Enabling ACP clock in hw_init (v2) drm/amdgpu/virt: don't dereference undefined 'module' struct
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index e97f80f86005..4e4a476593e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -328,9 +328,11 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)
sizeof(amdgim_vf2pf_info));
AMDGPU_FW_VRAM_VF2PF_READ(adev, driver_version,
&str);
+#ifdef MODULE
if (THIS_MODULE->version != NULL)
strcpy(str, THIS_MODULE->version);
else
+#endif
strcpy(str, "N/A");
AMDGPU_FW_VRAM_VF2PF_WRITE(adev, driver_cert,
0);