aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/aat2870-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 11:49:56 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 11:49:56 +0000
commit9ee4be4156b1a507f199e750ba2c13ffb6ea9b42 (patch)
treec92cb39ad1f0be559390c2a995d9aad2b0300b14 /drivers/regulator/aat2870-regulator.c
parentregulator: Convert virtual and userspace regulator consumer drivers to use module_platform_driver() (diff)
parentregulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator (diff)
downloadlinux-dev-9ee4be4156b1a507f199e750ba2c13ffb6ea9b42.tar.xz
linux-dev-9ee4be4156b1a507f199e750ba2c13ffb6ea9b42.zip
Merge remote-tracking branch 'regulator/for-linus' into regulator-next
Diffstat (limited to 'drivers/regulator/aat2870-regulator.c')
-rw-r--r--drivers/regulator/aat2870-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 5c94d95fd859..685ad43b0749 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -160,7 +160,7 @@ static struct aat2870_regulator *aat2870_get_regulator(int id)
break;
}
- if (!ri)
+ if (i == ARRAY_SIZE(aat2870_regulators))
return NULL;
ri->enable_addr = AAT2870_LDO_EN;