mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-27 04:50:25 +09:00
drm/amd/pm: Fix power context allocation in SMU13
commit 1d13c49cf4 upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2984dbacf6
commit
4ce28f3ab3
@@ -456,11 +456,11 @@ int smu_v13_0_init_power(struct smu_context *smu)
|
||||
if (smu_power->power_context || smu_power->power_context_size != 0)
|
||||
return -EINVAL;
|
||||
|
||||
smu_power->power_context = kzalloc(sizeof(struct smu_13_0_dpm_context),
|
||||
smu_power->power_context = kzalloc(sizeof(struct smu_13_0_power_context),
|
||||
GFP_KERNEL);
|
||||
if (!smu_power->power_context)
|
||||
return -ENOMEM;
|
||||
smu_power->power_context_size = sizeof(struct smu_13_0_dpm_context);
|
||||
smu_power->power_context_size = sizeof(struct smu_13_0_power_context);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user