summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-25 14:04:44 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-25 14:04:44 -0800
commit6366213ee3355278a90d1c20a1971c68fa3af68b (patch)
treed5adedb900d10f9c1443ae458e3ad6efa987b487
parent4660ba63f1c4e07c20a435e084f12ba48a82bd2b (diff)
parent4b2f67d756cf4a5ed8e8d11caa7dcea06c41a09e (diff)
downloadtalos-op-linux-6366213ee3355278a90d1c20a1971c68fa3af68b.tar.gz
talos-op-linux-6366213ee3355278a90d1c20a1971c68fa3af68b.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: regulator, mc13xxx: Remove pointless test for unsigned less than zero regulator: Fix warning with CONFIG_BUG disabled
-rw-r--r--drivers/regulator/mc13xxx-regulator-core.c2
-rw-r--r--drivers/regulator/wm831x-dcdc.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c
index f53d31b950d4..2bb5de1f2421 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -174,7 +174,7 @@ static int mc13xxx_regulator_get_voltage(struct regulator_dev *rdev)
dev_dbg(rdev_get_dev(rdev), "%s id: %d val: %d\n", __func__, id, val);
- BUG_ON(val < 0 || val > mc13xxx_regulators[id].desc.n_voltages);
+ BUG_ON(val > mc13xxx_regulators[id].desc.n_voltages);
return mc13xxx_regulators[id].voltages[val];
}
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index 8b0d2c4bde91..06df898842c0 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -120,6 +120,7 @@ static unsigned int wm831x_dcdc_get_mode(struct regulator_dev *rdev)
return REGULATOR_MODE_IDLE;
default:
BUG();
+ return -EINVAL;
}
}
OpenPOWER on IntegriCloud