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:
Benjamin Cabé
2025-06-07 22:03:42 +02:00
committed by Benjamin Cabé
parent d67cd57fd4
commit e37631eea7

View File

@@ -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)) {