Re: (subset) [PATCH] mfd: sm501: fix reference leak on failed device registration

From: Lee Jones

Date: Thu Apr 30 2026 - 10:17:53 EST


On Thu, 16 Apr 2026 00:26:27 +0800, Guangshuo Li wrote:
> When platform_device_register() fails in sm501_register_device(), the
> embedded struct device in pdev has already been initialized by
> device_initialize(), but the failure path only reports the error and
> returns without dropping the device reference for the current platform
> device:
>
> sm501_register_device()
> -> platform_device_register(pdev)
> -> device_initialize(&pdev->dev)
> -> setup_pdev_dma_masks(pdev)
> -> platform_device_add(pdev)
>
> [...]

Applied, thanks!

[1/1] mfd: sm501: fix reference leak on failed device registration
commit: f764c91c47046547bbe5b4f19cc5ad64132ee7d2

--
Lee Jones [李琼斯]