mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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:
parent
592713a896
commit
95e21dff47
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user