Skip to contentSkip to conversation

regulator: palmas: Drop regulator_unregister while using devm_regulator_register

PATCH Applied Axel Lin 3 participants 3 messages Sep 5, 2013 – Sep 6, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: palmas: Drop regulator_unregister while using devm_regulator_register

Commmit af40a94aba "regulator: palmas: Use devm_regulator_register" missed removing a regulator_unregister() call if palmas_extreg_init falis. Fix it.

---
 drivers/regulator/palmas-regulator.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/regulator/palmas-regulator.c +1 -3
index 37b1068..825f798 100644
@@ -1019,10 +1019,8 @@ static int palmas_regulators_probe(struct platform_device *pdev)
 				else
 					ret = palmas_extreg_init(palmas,
 							id, reg_init);
-				if (ret) {
-					regulator_unregister(pmic->rdev[id]);
+				if (ret)
 					return ret;
-				}
 			}
 		}
 	}
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw

Hi Axel,

Quoted 4 lines · Axel Lin

Commmit af40a94aba "regulator: palmas: Use devm_regulator_register" missed removing a regulator_unregister() call if palmas_extreg_init falis. Fix it.

I was about to do it. Thanks for doing :)

Signature · 2 lines
With warm regards,
Sachin
maintainer Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

Commmit af40a94aba "regulator: palmas: Use devm_regulator_register" missed removing a regulator_unregister() call if palmas_extreg_init falis. Fix it.

Applied, thanks.