]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/amd: pmf: Simplify error flow in amd_pmf_init_smart_pc()
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 22 May 2025 00:34:57 +0000 (19:34 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 10 Jun 2025 07:42:15 +0000 (10:42 +0300)
commitd7186dfd41924ef01ef490be5b82ab63cc417b31
tree0bcd599600a7825a24dca0416c4adaabf4529117
parent93103d56650d7a38ed37ba4041578310f82776ae
platform/x86/amd: pmf: Simplify error flow in amd_pmf_init_smart_pc()

commit 5b1122fc4995f ("platform/x86/amd/pmf: fix cleanup in
amd_pmf_init_smart_pc()") adjusted the error handling flow to use a ladder
but this isn't actually needed because work is only scheduled in
amd_pmf_start_policy_engine() and with device managed cleanups pointers
for allocations don't need to be freed.

Adjust the error flow to a single call to amd_pmf_deinit_smart_pc() for
the cases that need to clean up.

Cc: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250512211154.2510397-4-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250522003457.1516679-4-superm1@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/pmf/tee-if.c