1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/adcxx1c: fix SAUL return value in case of read error

This commit is contained in:
Vincent Dupont 2018-11-29 09:52:00 +01:00
parent a9a30c0c0f
commit 38da047864

View File

@ -26,7 +26,9 @@
static int read_adc(const void *dev, phydat_t *res)
{
adcxx1c_read_raw((const adcxx1c_t *)dev, res->val);
if (adcxx1c_read_raw((const adcxx1c_t *)dev, res->val)) {
return -ECANCELED;
}
res->unit = UNIT_NONE;
res->scale = 0;