diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-03 13:49:55 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2009-09-22 08:32:40 -0400 |
commit | f25e0b4fcc38d120e704c377791158c4b2a54daa (patch) | |
tree | 6547268eaf41ad2f987519ec71c0c346fe8868e0 /drivers/regulator | |
parent | b39480ac37951de126455991744c9dbb61bbb839 (diff) |
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6e0c723371d8..dfbf4312ec34 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2409,14 +2409,14 @@ static int __init regulator_init_complete(void) | |||
2409 | ops = rdev->desc->ops; | 2409 | ops = rdev->desc->ops; |
2410 | c = rdev->constraints; | 2410 | c = rdev->constraints; |
2411 | 2411 | ||
2412 | if (c->name) | 2412 | if (c && c->name) |
2413 | name = c->name; | 2413 | name = c->name; |
2414 | else if (rdev->desc->name) | 2414 | else if (rdev->desc->name) |
2415 | name = rdev->desc->name; | 2415 | name = rdev->desc->name; |
2416 | else | 2416 | else |
2417 | name = "regulator"; | 2417 | name = "regulator"; |
2418 | 2418 | ||
2419 | if (!ops->disable || c->always_on) | 2419 | if (!ops->disable || (c && c->always_on)) |
2420 | continue; | 2420 | continue; |
2421 | 2421 | ||
2422 | mutex_lock(&rdev->mutex); | 2422 | mutex_lock(&rdev->mutex); |