Re: [PATCH] firmware: arm_scmi: Balance device refcount when destroying devices

From: Sudeep Holla
Date: Tue Apr 08 2025 - 06:32:29 EST


On Thu, 06 Mar 2025 18:54:47 +0000, Cristian Marussi wrote:
> Using device_find_child() to lookup the proper SCMI device to destroy
> causes an unbalance in device refcount, since device_find_child() calls an
> implicit get_device(): this, in turns, inhibits the call of the provided
> release methods upon devices destruction.
>
> As a consequence, one of the structures that is not freed properly upon
> destruction is the internal struct device_private dev->p populated by the
> drivers subsystem core.
>
> [...]

Applied to sudeep.holla/linux (for-next/scmi/fixes), thanks!

[1/1] firmware: arm_scmi: Balance device refcount when destroying devices
https://git.kernel.org/sudeep.holla/c/9ca67840c0dd
--
Regards,
Sudeep