From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 3/5] regulator: Check for constraints in regulator_init_complete()
Date: Mon, 3 Aug 2009 18:49:55 +0100 [thread overview]
Message-ID: <1249321797-4582-3-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1249321797-4582-2-git-send-email-broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
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 6e0c723..dfbf431 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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);
--
1.6.3.3
next prev parent reply other threads:[~2009-08-03 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 17:49 [PATCH 1/5] regulator: More explict error reporting for fixed regulator Mark Brown
2009-08-03 17:49 ` [PATCH 2/5] regulator: Check for constraints before using them for name Mark Brown
2009-08-03 17:49 ` Mark Brown [this message]
2009-08-03 17:49 ` [PATCH 4/5] regulator: Push locking for regulator_is_enabled() out Mark Brown
2009-08-03 17:49 ` [PATCH 5/5] regulator: regulator_enable() permission checking Mark Brown
2009-08-03 19:29 ` [PATCH 1/5] regulator: More explict error reporting for fixed regulator Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249321797-4582-3-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®