summaryrefslogtreecommitdiff
path: root/drivers/regulator/arizona-micsupp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/arizona-micsupp.c')
-rw-r--r--drivers/regulator/arizona-micsupp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c
index 20079006459a..4116e74effa4 100644
--- a/drivers/regulator/arizona-micsupp.c
+++ b/drivers/regulator/arizona-micsupp.c
@@ -284,6 +284,9 @@ static int arizona_micsupp_probe(struct platform_device *pdev)
micsupp->regulator = devm_regulator_register(&pdev->dev,
desc,
&config);
+
+ of_node_put(config.of_node);
+
if (IS_ERR(micsupp->regulator)) {
ret = PTR_ERR(micsupp->regulator);
dev_err(arizona->dev, "Failed to register mic supply: %d\n",
@@ -291,8 +294,6 @@ static int arizona_micsupp_probe(struct platform_device *pdev)
return ret;
}
- of_node_put(config.of_node);
-
platform_set_drvdata(pdev, micsupp);
return 0;