[PATCH] iommu/dart: add missing put_device() call in apple_dart_of_xlate

Markus Elfring Markus.Elfring at web.de
Sat Jul 12 11:22:13 PDT 2025


> The apple_dart_of_xlate() function obtains a platform device reference
> via of_find_device_by_node() but doesn't release it with put_device().
> This patch adds proper device reference handling to prevent memory
> leaks.

Will another goto chain become helpful here?

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16-rc5#n94


Under which circumstances can the application of the attribute “put_device” grow?
https://elixir.bootlin.com/linux/v6.16-rc5/source/include/linux/device.h#L1140

Regards,
Markus



More information about the linux-arm-kernel mailing list