提交 60ef66fc 编写于 作者: M Mark Brown 提交者: Liam Girdwood

regulator: Handle missing constraints in _regulator_disable()

Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 a9366e61
......@@ -1283,7 +1283,8 @@ static int _regulator_disable(struct regulator_dev *rdev)
return -EIO;
/* are we the last user and permitted to disable ? */
if (rdev->use_count == 1 && !rdev->constraints->always_on) {
if (rdev->use_count == 1 &&
(rdev->constraints && !rdev->constraints->always_on)) {
/* we are last user */
if (_regulator_can_change_status(rdev) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册