Skip to contentSkip to conversation

gpu: drm: Remove call to memset after kzalloc in process_pptable_v1_0.c

PATCH Applied Fuqian Huang 1 participant 1 message Jun 27, 2019

Subsystems (2)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 15/87 gpu: drm: Remove call to memset after kzalloc in process_pptable_v1_0.c

kzalloc has already zeroes the memory.
So memset is not needed.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c +0 -2
index ae64ff7153d6..eb7757443bdd 100644
@@ -1065,8 +1065,6 @@ static int pp_tables_v1_0_initialize(struct pp_hwmgr *hwmgr)
 	PP_ASSERT_WITH_CODE((NULL != hwmgr->pptable),
 			    "Failed to allocate hwmgr->pptable!", return -ENOMEM);
 
-	memset(hwmgr->pptable, 0x00, sizeof(struct phm_ppt_v1_information));
-
 	powerplay_table = get_powerplay_table(hwmgr);
 
 	PP_ASSERT_WITH_CODE((NULL != powerplay_table),
Signature · 1 line
2.11.0