Skip to content

Commit a5467eb

Browse files
tititiou36alexdeucher
authored andcommitted
drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'
'watermarks_table' must be freed instead 'clocks_table', because 'clocks_table' is known to be NULL at this point and 'watermarks_table' is never freed if the last kzalloc fails. Fixes: c98ee89 ("drm/amd/pm: add the fine grain tuning function for vangogh") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent b5768a7 commit a5467eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int vangogh_tables_init(struct smu_context *smu)
256256
return 0;
257257

258258
err3_out:
259-
kfree(smu_table->clocks_table);
259+
kfree(smu_table->watermarks_table);
260260
err2_out:
261261
kfree(smu_table->gpu_metrics_table);
262262
err1_out:

0 commit comments

Comments
 (0)