diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 6c9670ff6be5..b5278ac4e6bd 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -1037,10 +1037,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; - } } } }