Skip to content

Commit 1d13c49

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amd/pm: Fix power context allocation in SMU13
Use the right data structure for allocation. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 2a1eb1a commit 1d13c49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,11 @@ int smu_v13_0_init_power(struct smu_context *smu)
573573
if (smu_power->power_context || smu_power->power_context_size != 0)
574574
return -EINVAL;
575575

576-
smu_power->power_context = kzalloc(sizeof(struct smu_13_0_dpm_context),
576+
smu_power->power_context = kzalloc(sizeof(struct smu_13_0_power_context),
577577
GFP_KERNEL);
578578
if (!smu_power->power_context)
579579
return -ENOMEM;
580-
smu_power->power_context_size = sizeof(struct smu_13_0_dpm_context);
580+
smu_power->power_context_size = sizeof(struct smu_13_0_power_context);
581581

582582
return 0;
583583
}

0 commit comments

Comments
 (0)