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:
Juha Niskanen 2018-03-22 06:44:40 -06:00 committed by Gregory Nutt
parent 4a0e98de3a
commit bcd1f1f774

View File

@ -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;
}
/****************************************************************************