[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1255435610-9765-2-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Tue, 13 Oct 2009 13:06:50 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Liam Girdwood <lrg@...mlogic.co.uk>
Cc: linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH 2/2] regulator: Handle missing constraints in _regulator_disable()
Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---
drivers/regulator/core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 25e35c7..1ac37f5 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1289,7 +1289,8 @@ static int _regulator_disable(struct regulator_dev *rdev)
return -EIO;
/* are we the last user and permitted to disable ? */
- if (rdev->use_count == 1 && !rdev->constraints->always_on) {
+ if (rdev->use_count == 1 &&
+ (rdev->constraints && !rdev->constraints->always_on)) {
/* we are last user */
if (_regulator_can_change_status(rdev) &&
--
1.6.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists