[PATCH 07/33] platform: Define platform_device_put cleanup handler
Gavin Shan
gshan at redhat.com
Sun Nov 9 17:03:32 PST 2025
On 11/7/25 10:34 PM, Ben Horgan wrote:
> Define a cleanup helper for use with __free to destroy platform devices
> automatically when the pointer goes out of scope. This is only intended to
> be used in error cases and so should be used with return_ptr() or
> no_free_ptr() directly to avoid the automatic destruction on success.
>
> A first use of this is introduced in a subsequent commit.
>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
> include/linux/platform_device.h | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Gavin Shan <gshan at redhat.com>
More information about the linux-arm-kernel
mailing list