From eb4900aa4c49e978041405ab2eeeb8538c7f736a Mon Sep 17 00:00:00 2001 From: Rex Zhu Date: Tue, 20 Mar 2018 16:32:07 +0800 Subject: drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions caused by 'commit 83e3c4615872 ("drm/amdgpu: Remove wrapper layer of smu ip functions")' BUG: unable to handle kernel NULL pointer dereference at 00000000000005d8 [ 313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu] Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/drm/amd/amdgpu/ci_dpm.c') diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c index 98d1dd253596..47ef3e6e7178 100644 --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c @@ -6244,6 +6244,7 @@ static int ci_dpm_early_init(void *handle) struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &ci_dpm_funcs; + adev->powerplay.pp_handle = adev; ci_dpm_set_irq_funcs(adev); return 0; -- cgit v1.2.3-58-ga151