mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
regulator: Check for constraints in regulator_init_complete()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
b39480ac37
commit
f25e0b4fcc
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue