Re: [PATCH] leds: mt6360: Fix error path in device_for_each_child_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 23 Oct 2024, Zhang Zekun wrote:

> When break out from device_for_each_child_node(), the child node
> is refcount added, and requires calls to fwnode_handle_put().
> Use scoped fwnode_handle_put() to put child node automatically in
> error path.
> 
> Fixes: 679f8652064b ("leds: Add mt6360 driver")
> Signed-off-by: Zhang Zekun <zhangzekun11@xxxxxxxxxx>
> ---
>  drivers/leds/flash/leds-mt6360.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

You were beaten to it I'm afraid:

https://lore.kernel.org/r/20240927-leds_device_for_each_child_node_scoped-v1-1-95c0614b38c8@xxxxxxxxx

-- 
Lee Jones [李琼斯]




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux