]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 5 Aug 2021 18:37:14 +0000 (20:37 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Aug 2021 15:36:55 +0000 (11:36 -0400)
commit8cb57b2a3c9fdd61fc1f09d2323d3809096acdd5
tree29536b37431071613fe5c26c63631dc449897c99
parente2bd02a2ec5aada100cca004361e98e6d301977a
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: 152584dd555a ("drm/amd/pm: add the fine grain tuning function for vangogh")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c