Re: [PATCH] leds: sgm3140: Put the child node reference on success

From: Markus Elfring

Date: Wed Nov 25 2026 - 10:16:36 EST


…
> Put the reference before returning success.

Please avoid a bit of duplicate source.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.4-rc4#n526


How do you think about to apply the attribute “__free(fwnode_handle_put)”
also in the implementation of the function “sgm3140_probe”?
https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/property.h#L229
https://elixir.bootlin.com/linux/v7.4-rc1/source/drivers/leds/flash/leds-sgm3140.c#L185-L281

Regards,
Markus