aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-03-20 04:28:56 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-03-21 00:44:21 -0400
commit81ce8bea035befed2ae7670bf9f9404fa3f46f71 (patch)
tree7fafc75985f18b09b48e6037e252ca90b296da24 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parente5b03032e34da84ee765ffbe4e36d344fdd04108 (diff)
drm/amdgpu: Fix kernel NULL pointer dereference when amdgpu fini
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4fa869b1a9cb..a824d5d2ebbe 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1752,7 +1752,8 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
1752 continue; 1752 continue;
1753 1753
1754 if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD && 1754 if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
1755 adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE) { 1755 adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
1756 adev->ip_blocks[i].version->funcs->set_clockgating_state) {
1756 /* ungate blocks before hw fini so that we can shutdown the blocks safely */ 1757 /* ungate blocks before hw fini so that we can shutdown the blocks safely */
1757 r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, 1758 r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
1758 AMD_CG_STATE_UNGATE); 1759 AMD_CG_STATE_UNGATE);