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

regulator: Check for constraints in regulator_init_complete()

Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 b39480ac
......@@ -2409,14 +2409,14 @@ static int __init regulator_init_complete(void)
ops = rdev->desc->ops;
c = rdev->constraints;
if (c->name)
if (c && c->name)
name = c->name;
else if (rdev->desc->name)
name = rdev->desc->name;
else
name = "regulator";
if (!ops->disable || c->always_on)
if (!ops->disable || (c && c->always_on))
continue;
mutex_lock(&rdev->mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册