Skip to content

Commit

Permalink
drm/amd/powerplay: Delete a redundant memory setting in vega20_set_de…
Browse files Browse the repository at this point in the history
…fault_od8_setttings()

The memory was set to zero already by a call of the function “kzalloc”.
Thus remove an extra call of the function “memset” for this purpose.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
elfring authored and alexdeucher committed Jun 17, 2019
1 parent 4fe7d1a commit b934152
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/powerplay/vega20_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,6 @@ static int vega20_set_default_od8_setttings(struct smu_context *smu)
if (!table_context->od8_settings)
return -ENOMEM;

memset(table_context->od8_settings, 0, sizeof(struct vega20_od8_settings));
od8_settings = (struct vega20_od8_settings *)table_context->od8_settings;

if (smu_feature_is_enabled(smu, FEATURE_DPM_SOCCLK_BIT)) {
Expand Down

0 comments on commit b934152

Please sign in to comment.