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: e20e47bcb3 ("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>
This commit is contained in:
Yang Wang 2026-03-30 22:23:06 -04:00 committed by Alex Deucher
parent 592713a896
commit 95e21dff47

View File

@ -1785,7 +1785,7 @@ static int smu_v15_0_8_get_power_limit(struct smu_context *smu,
*current_power_limit = power_limit;
if (default_power_limit)
*max_power_limit = pptable->MaxSocketPowerLimit;
*default_power_limit = pptable->MaxSocketPowerLimit;
if (max_power_limit)
*max_power_limit = pptable->MaxSocketPowerLimit;