leds: max77693: Add missing of_node_put
authorJacek Anaszewski <j.anaszewski@samsung.com>
Wed, 25 Nov 2015 08:34:10 +0000 (09:34 +0100)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 4 Jan 2016 08:57:38 +0000 (09:57 +0100)
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@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/leds/leds-max77693.c

index 9401e33305b3aef5abec0cbd11de063307dc0985..1eb58ef6aefe44c888dd52a7ddb10631231d92f0 100644 (file)
@@ -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;
                }