Re: [PATCH] leds: Add of_node_put() before return

From: Stephen Boyd
Date: Mon Jun 06 2022 - 15:45:10 EST


Quoting Wan Jiabing (2022-06-01 00:52:03)
> Fix following coccicheck warning:
> drivers/leds/rgb/leds-qcom-lpg.c:1107:2-34: WARNING: Function for_each_available_child_of_node should have of_node_put() before return around line 1110.
> drivers/leds/rgb/leds-qcom-lpg.c:1286:1-33: WARNING: Function for_each_available_child_of_node should have of_node_put() before return around line 1289.
>
> Early exits from for_each_available_child_of_node should decrement the
> node reference counter.
>
> Fixes: 24e2d05d1b68 ("leds: Add driver for Qualcomm LPG")
> Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx>
> ---

Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>