mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
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: Ryan Taylor <Ryan.Taylor@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
8976f73b67
commit
eb45604e29
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue