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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alexander Shiyan <eagle.alexander923@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux