From 8aa274f5539de0dd636b5692c0a121f5e3b21ab3 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 6 Feb 2024 03:56:23 +0000 Subject: [PATCH] drm/amd/powerplay: Fix kzalloc parameter 'ATOM_Tonga_PPM_Table' in 'get_platform_power_management_table()' From Srinivasan Shanmugam 0ee4c5829fb3cfb8b168956be9a28ede5996a8f8 in linux-6.6.y/6.6.16 6616b5e1999146b1304abe78232af810080c67e3 in mainline linux --- sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c index f2a55c1413f..17882f8dfdd 100644 --- a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c +++ b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c @@ -200,7 +200,7 @@ static int get_platform_power_management_table( struct pp_hwmgr *hwmgr, ATOM_Tonga_PPM_Table *atom_ppm_table) { - struct phm_ppm_table *ptr = kzalloc(sizeof(ATOM_Tonga_PPM_Table), GFP_KERNEL); + struct phm_ppm_table *ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); struct phm_ppt_v1_information *pp_table_information = (struct phm_ppt_v1_information *)(hwmgr->pptable); -- 2.20.1