diff options
| author | Christophe JAILLET <[email protected]> | 2021-08-05 18:37:14 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-08-06 01:18:00 +0000 |
| commit | a5467ebd681fa2ba09cfa64689c5fc0773fd0634 (patch) | |
| tree | 568b99ad2a04c911c5a8fef17220d1fa49373d7a | |
| parent | DRM: gpu: radeon: Fixed coding style issues (diff) | |
| download | kernel-a5467ebd681fa2ba09cfa64689c5fc0773fd0634.tar.gz kernel-a5467ebd681fa2ba09cfa64689c5fc0773fd0634.zip | |
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: c98ee89736b8 ("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]>
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c index 18681dc458da..bcaaa086fc2f 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c @@ -256,7 +256,7 @@ static int vangogh_tables_init(struct smu_context *smu) return 0; err3_out: - kfree(smu_table->clocks_table); + kfree(smu_table->watermarks_table); err2_out: kfree(smu_table->gpu_metrics_table); err1_out: |
