]> 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 01:18:00 +0000 (21:18 -0400)
commit7a6a84c980e989b7e4c922bbecb9b13287c6c638
tree568b99ad2a04c911c5a8fef17220d1fa49373d7a
parent3044a1f9c0ce82cfd4f8509c83099c7d8621b589
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