drivers: dac: max22017: return negative errno
Changed the return value for unsupported channel from ENOTSUP to -ENOTSUP Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
d67cd57fd4
commit
e37631eea7
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ static int max22017_write_value(const struct device *dev, uint8_t channel, uint3
|
|||
|
||||
if (channel > config->nchannels - 1) {
|
||||
LOG_ERR("unsupported channel %d", channel);
|
||||
return ENOTSUP;
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
if (value >= (1 << config->resolution)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue