Commit 6f3c9dbb authored by Likun Gao's avatar Likun Gao Committed by Alex Deucher

drm/amd/pm: fix NULL pointer issue of amdgpu_smu_stb_debug_fs_init

Fix NULL pointer issue on amdgpu_smu_stb_debug_fs_init if SMU block not
enabled.
Signed-off-by: default avatarLikun Gao <Likun.Gao@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 64440743
...@@ -3031,7 +3031,7 @@ void amdgpu_smu_stb_debug_fs_init(struct amdgpu_device *adev) ...@@ -3031,7 +3031,7 @@ void amdgpu_smu_stb_debug_fs_init(struct amdgpu_device *adev)
struct smu_context *smu = adev->powerplay.pp_handle; struct smu_context *smu = adev->powerplay.pp_handle;
if (!smu->stb_context.stb_buf_size) if (!smu || (!smu->stb_context.stb_buf_size))
return; return;
debugfs_create_file_size("amdgpu_smu_stb_dump", debugfs_create_file_size("amdgpu_smu_stb_dump",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment