Re: [PATCH] platform/x86/amd/hfi: fix platform device leak on init failure
From: Mario Limonciello
Date: Thu Oct 08 2026 - 16:05:05 EST
On 10/8/26 12:37, Ilpo Järvinen wrote:
On Mon, 21 Sep 2026 16:26:09 +0800, Guangshuo Li wrote:
amd_hfi_init() registers the HFI platform device before registering
the platform driver. If platform_driver_register() fails, the function
returns the error without unregistering the already registered platform
device.
Since the failed init path does not run amd_hfi_exit(), the platform
device remains registered and its reference is never dropped, preventing
the associated platform object from being released.
[...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/1] platform/x86/amd/hfi: fix platform device leak on init failure
commit: a15d58ff15a6ede327e3814c791c6912b973e434
--
i.
Hi Ilpo,
Did you see my follow up comment that this patch should be unnecessary?
https://lore.kernel.org/platform-driver-x86/652e3b3b-0f56-4d01-8fd8-e4a9ddedabfe@xxxxxxxxxx/
Basically pointless call torn out by this series:
https://lore.kernel.org/platform-driver-x86/20260921170411.1149960-1-mario.limonciello@xxxxxxx/