From bcd1f1f774471467f03eac49b408bf6371e73c29 Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Thu, 22 Mar 2018 06:44:40 -0600 Subject: [PATCH] drivers/sensors/sht21: Change I2C_TRANSFER return value so that it return on zero on success, not the count of bytes transferred. --- drivers/sensors/sht21.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sensors/sht21.c b/drivers/sensors/sht21.c index 893ef0da8b..ccbdb3f025 100644 --- a/drivers/sensors/sht21.c +++ b/drivers/sensors/sht21.c @@ -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; } /****************************************************************************