summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-03-14 10:10:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-03-14 10:10:24 +0100
commitafd64e7ee4928c3104ddff40b3fda6a45bd10b50 (patch)
tree5d29b2b29bbbb4b3206762a092930b9a1ae1f2eb /drivers/regulator/core.c
parent57c4f57cd686284f2f7f65b975e9107a9b2eca6b (diff)
parentc4af8dd9bfe67d6b3b4cd55ba9cf9d4a436914cc (diff)
downloadbarebox-afd64e7ee4928c3104ddff40b3fda6a45bd10b50.tar.gz
barebox-afd64e7ee4928c3104ddff40b3fda6a45bd10b50.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index a4674424b7..a29fe90d8d 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -197,14 +197,14 @@ static struct regulator_internal *of_regulator_get(struct device_d *dev, const c
struct device_node *node, *node_parent;
int ret;
- propname = basprintf("%s-supply", supply);
-
/*
* If the device does have a device node return the dummy regulator.
*/
if (!dev->device_node)
return NULL;
+ propname = basprintf("%s-supply", supply);
+
/*
* If the device node does not contain a supply property, this device doesn't
* need a regulator. Return the dummy regulator in this case.
@@ -244,7 +244,8 @@ static struct regulator_internal *of_regulator_get(struct device_d *dev, const c
goto out;
}
- return ERR_PTR(ret);
+ ri = ERR_PTR(ret);
+ goto out;
}
list_for_each_entry(ri, &regulator_list, list) {