Skip to content

Commit 95e21df

Browse files
Yang Wangalexdeucher
authored andcommitted
drm/amd/pm: fix null pointer dereference issue in smu_v15_0_8_get_power_limit()
Fix null pointer issues caused by coding errors Fixes: e20e47b ("drm/amd/pm: add set{get}_power_limit support for smu 15.0.8") Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 592713a commit 95e21df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ static int smu_v15_0_8_get_power_limit(struct smu_context *smu,
17851785
*current_power_limit = power_limit;
17861786

17871787
if (default_power_limit)
1788-
*max_power_limit = pptable->MaxSocketPowerLimit;
1788+
*default_power_limit = pptable->MaxSocketPowerLimit;
17891789

17901790
if (max_power_limit)
17911791
*max_power_limit = pptable->MaxSocketPowerLimit;

0 commit comments

Comments
 (0)