drivers/sensors/sht21: Change I2C_TRANSFER return value so that it return on zero on success, not the count of bytes transferred.
This commit is contained in:
parent
4a0e98de3a
commit
bcd1f1f774
@ -171,7 +171,7 @@ static int sht21_access(FAR struct sht21_dev_s *priv,
|
||||
|
||||
sht21_dbg("reg_addr: 0x%02X len: %d reg_value: 0x%02x ret: %d\n",
|
||||
reg_addr, len, reg_value ? *reg_value : 0, ret);
|
||||
return ret;
|
||||
return (ret >= 0) ? OK : ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user