[PATCH 3/6] drivers: regulator: fixed: Fix error path in probe

Alexander Shiyan eagle.alexander923 at gmail.com
Tue Jun 28 23:30:21 PDT 2022


Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
 drivers/regulator/fixed.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index f068fded62..ddcc1bcb97 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -78,10 +78,9 @@ static int regulator_fixed_probe(struct device_d *dev)
 	}
 
 	ret = of_regulator_register(&fix->rdev, dev->device_node);
-	if (ret)
-		return ret;
+	if (!ret)
+		return 0;
 
-	return 0;
 err:
 	free(fix);
 
-- 
2.32.0




More information about the barebox mailing list