Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: leds: fix leds refcount

From: Andrew Lunn
Date: Tue Oct 08 2024 - 12:40:57 EST


> - leds = fwnode_get_named_child_node(p->fwnode, "leds");
> + struct fwnode_handle *leds __free(fwnode_handle) =
> + fwnode_get_named_child_node(p->fwnode, "leds");

https://docs.kernel.org/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs

Low level cleanup constructs (such as __free()) can be used when
building APIs and helpers, especially scoped iterators. However,
direct use of __free() within networking core and drivers is
discouraged. Similar guidance applies to declaring variables
mid-function.

Andrew

---
pw-bot: cr