summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorAndrej Picej <andrej.picej@norik.com>2021-11-19 14:06:23 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-03-01 09:44:26 +0100
commit348e12a87003d2776a5ffbe97652f2719b01159c (patch)
tree946ee9195b5578e7562a1545dae1b03e631486bb /drivers/regulator/core.c
parentbfb384e74dcac162f585e3a7483f607dfaf6e595 (diff)
downloadbarebox-348e12a87003d2776a5ffbe97652f2719b01159c.tar.gz
barebox-348e12a87003d2776a5ffbe97652f2719b01159c.tar.xz
regulator: fix memory leak
Fix memory leak of propname. Signed-off-by: Andrej Picej <andrej.picej@norik.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b2e5f8caa2..d3c43ce9a3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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) {