Thread (3 messages) 3 messages, 3 authors, 2025-07-14

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

From: Markus Elfring <hidden>
Date: 2025-07-12 18:22:48
Also in: asahi, linux-iommu, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help