projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ubsan: disable UBSAN_TRAP for all*config
[linux-2.6-microblaze.git]
/
drivers
/
regulator
/
helpers.c
diff --git
a/drivers/regulator/helpers.c
b/drivers/regulator/helpers.c
index
e4bb09b
..
f42b394
100644
(file)
--- a/
drivers/regulator/helpers.c
+++ b/
drivers/regulator/helpers.c
@@
-649,6
+649,8
@@
int regulator_list_voltage_table(struct regulator_dev *rdev,
if (selector >= rdev->desc->n_voltages)
return -EINVAL;
+ if (selector < rdev->desc->linear_min_sel)
+ return 0;
return rdev->desc->volt_table[selector];
}