drm/amd/pm: Fix power context allocation in SMU13
Subsystems (3)
PATCH 1/1 drm/amd/pm: Fix power context allocation in SMU13
From: Lijo Lazar <[email protected]>
Use the right data structure for allocation.
Signed-off-by Lijo Lazar <[email protected]>
Reviewed-by Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2 -2
@@ -534,11 +534,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 ; }
Signature · 1 line
2.17.1
Quoted 7 lines · Hawking Zhang
From: Lijo Lazar <[email protected]>
Use the right data structure for allocation.
Signed-off-by Lijo Lazar <[email protected]>Reviewed-by Hawking Zhang <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2
-3@@ -534,11 +534,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 ; } --2.17.1