drivers: regulator: fix is_supported_voltage return code
If a voltage is not supported we need to return false, not a negative errno. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
491a132369
commit
2b6a211946
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ bool regulator_is_supported_voltage(const struct device *dev, int32_t min_uv,
|
|||
|
||||
/* voltage may not be allowed, even if supported */
|
||||
if ((min_uv < config->min_uv) || (max_uv > config->max_uv)) {
|
||||
return -EINVAL;
|
||||
return false;
|
||||
}
|
||||
|
||||
volt_cnt = regulator_count_voltages(dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue