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:
committed by
Benjamin Cabé
parent
d67cd57fd4
commit
e37631eea7
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user