提交 cb2e45e3 编写于 作者: A Axel Lin 提交者: Mark Brown

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.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 cab87f06
...@@ -1037,10 +1037,8 @@ static int palmas_regulators_probe(struct platform_device *pdev) ...@@ -1037,10 +1037,8 @@ static int palmas_regulators_probe(struct platform_device *pdev)
else else
ret = palmas_extreg_init(palmas, ret = palmas_extreg_init(palmas,
id, reg_init); id, reg_init);
if (ret) { if (ret)
regulator_unregister(pmic->rdev[id]);
return ret; return ret;
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册