Commit f25e0b4f authored by Mark Brown's avatar Mark Brown Committed by Liam Girdwood

regulator: Check for constraints in regulator_init_complete()

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment