diff options
-rw-r--r-- | drivers/regulator/da903x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index aa224d936e0d..f8c4661a7a81 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c | |||
@@ -331,7 +331,7 @@ static int da9034_get_ldo12_voltage(struct regulator_dev *rdev) | |||
331 | static int da9034_list_ldo12_voltage(struct regulator_dev *rdev, | 331 | static int da9034_list_ldo12_voltage(struct regulator_dev *rdev, |
332 | unsigned selector) | 332 | unsigned selector) |
333 | { | 333 | { |
334 | if (selector > ARRAY_SIZE(da9034_ldo12_data)) | 334 | if (selector >= ARRAY_SIZE(da9034_ldo12_data)) |
335 | return -EINVAL; | 335 | return -EINVAL; |
336 | return da9034_ldo12_data[selector] * 1000; | 336 | return da9034_ldo12_data[selector] * 1000; |
337 | } | 337 | } |