summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-bcm6358.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-bcm6358.c')
-rw-r--r--drivers/leds/leds-bcm6358.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c
index 7ea352670..82b4ee1bc 100644
--- a/drivers/leds/leds-bcm6358.c
+++ b/drivers/leds/leds-bcm6358.c
@@ -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;