Commit eb45604e authored by Ryan Taylor's avatar Ryan Taylor Committed by Alex Deucher

drm/amd/pm: fix smu_v11_0_init_power power_context allocation

Allocate smu_power->power_context to size of smu_11_0_power_context instead of
smu_11_0_dpm_context.
Signed-off-by: default avatarRyan Taylor <Ryan.Taylor@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8976f73b
......@@ -470,11 +470,11 @@ int smu_v11_0_init_power(struct smu_context *smu)
{
struct smu_power_context *smu_power = &smu->smu_power;
smu_power->power_context = kzalloc(sizeof(struct smu_11_0_dpm_context),
smu_power->power_context = kzalloc(sizeof(struct smu_11_0_power_context),
GFP_KERNEL);
if (!smu_power->power_context)
return -ENOMEM;
smu_power->power_context_size = sizeof(struct smu_11_0_dpm_context);
smu_power->power_context_size = sizeof(struct smu_11_0_power_context);
return 0;
}
......
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