Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
[firefly-linux-kernel-4.4.55.git] / drivers / leds / leds-bcm6358.c
index 7ea3526702e0c56b2a841e0bf2d2dccbe3f606f6..82b4ee1bc87e03e3df18fe5e044270c0996b18a5 100644 (file)
@@ -215,8 +215,10 @@ static int bcm6358_leds_probe(struct platform_device *pdev)
                }
 
                rc = bcm6358_led(dev, child, reg, mem, lock);
-               if (rc < 0)
+               if (rc < 0) {
+                       of_node_put(child);
                        return rc;
+               }
        }
 
        return 0;