diff options
Diffstat (limited to 'drivers/regulator/aat2870-regulator.c')
-rw-r--r-- | drivers/regulator/aat2870-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c index 5abeb3ac3e8d..298c6c6a2795 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) | |||
160 | break; | 160 | break; |
161 | } | 161 | } |
162 | 162 | ||
163 | if (!ri) | 163 | if (i == ARRAY_SIZE(aat2870_regulators)) |
164 | return NULL; | 164 | return NULL; |
165 | 165 | ||
166 | ri->enable_addr = AAT2870_LDO_EN; | 166 | ri->enable_addr = AAT2870_LDO_EN; |