Skip to content
Snippets Groups Projects
Commit 38da0478 authored by Vincent Dupont's avatar Vincent Dupont
Browse files

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

parent a9a30c0c
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
static int read_adc(const void *dev, phydat_t *res) 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->unit = UNIT_NONE;
res->scale = 0; res->scale = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment