[PATCH] soc: imx8m: unregister the soc and cpufreq devices if action setup fails

Frank.Li at oss.nxp.com Frank.Li at oss.nxp.com
Thu Nov 19 13:20:00 PST 2026


From: Frank Li <Frank.Li at nxp.com>


On Wed, 04 Nov 2026 02:14:32 +0000, Wentao Liang wrote:
> imx8m_soc_probe() registers the soc device and the imx-cpufreq-dt
> platform device and then installs a devm action to unregister each of
> them.  With plain devm_add_action() a failure to install the action
> returns the error without unregistering the device that was just
> registered, so the device is leaked and its sysfs name stays occupied.
>
> Use devm_add_action_or_reset(), which runs the unregister callback when
> the action cannot be added.
>
> [...]

Applied, thanks!

[1/1] soc: imx8m: unregister the soc and cpufreq devices if action setup fails
      commit: 398d92968e2c35be7788df3885ab6bd885b0b6ab

Drop unexisting tag Assisted-by

Best regards,
--
Frank Li <Frank.Li at nxp.com>



More information about the linux-arm-kernel mailing list