]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/amd: pmf: Prevent amd_pmf_tee_deinit() from running twice
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 22 May 2025 00:34:56 +0000 (19:34 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 10 Jun 2025 07:42:14 +0000 (10:42 +0300)
commit93103d56650d7a38ed37ba4041578310f82776ae
tree560f34d190d93eecf45d10614a970350e7a9b532
parentd9db3a941270d92bbd1a6a6b54a10324484f2f2d
platform/x86/amd: pmf: Prevent amd_pmf_tee_deinit() from running twice

If any of the tee init fails, pass up the errors and clear the tee_ctx
pointer. This will prevent cleaning up multiple times.

Fixes: ac052d8c08f9d ("platform/x86/amd/pmf: Add PMF TEE interface")
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250512211154.2510397-3-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250522003457.1516679-3-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