Each break out of the for_each_available_child_of_node loop requires of_node_put(). This patch adds missing of_node_put() when loop breaks on conflicting values of led-sources DT property. Signed-off-by: Jacek Anaszewski <j.anaszewski@xxxxxxxxxxx> Cc: Rob Herring <robh@xxxxxxxxxx> Cc: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- drivers/leds/leds-max77693.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/leds/leds-max77693.c b/drivers/leds/leds-max77693.c index 9401e33..1eb58ef 100644 --- a/drivers/leds/leds-max77693.c +++ b/drivers/leds/leds-max77693.c @@ -648,6 +648,7 @@ static int max77693_led_parse_dt(struct max77693_led_device *led, if (sub_nodes[fled_id]) { dev_err(dev, "Conflicting \"led-sources\" DT properties\n"); + of_node_put(child_node); return -EINVAL; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html