Re: [PATCH] platform/x86/amd/hfi: fix platform device leak on init failure
From: Ilpo Järvinen
Date: Thu Oct 08 2026 - 13:38:23 EST
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.