diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-03-14 10:10:24 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-03-14 10:10:24 +0100 |
commit | afd64e7ee4928c3104ddff40b3fda6a45bd10b50 (patch) | |
tree | 5d29b2b29bbbb4b3206762a092930b9a1ae1f2eb /drivers/regulator/core.c | |
parent | 57c4f57cd686284f2f7f65b975e9107a9b2eca6b (diff) | |
parent | c4af8dd9bfe67d6b3b4cd55ba9cf9d4a436914cc (diff) | |
download | barebox-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.c | 7 |
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, ®ulator_list, list) { |