summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/addac
diff options
context:
space:
mode:
authorJeremy Fertic <jeremyfertic@gmail.com>2018-12-04 18:49:00 -0700
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-12-08 11:15:54 +0000
commit5c608d4dd49a4ffbedc85f8a89820173df12b111 (patch)
tree71ab277b1863dd833dbc97c6bda4354c17ad6d19 /drivers/staging/iio/addac
parentc3e566c8cb553026cf530f01c80b665a2a0926f9 (diff)
downloadlinux-5c608d4dd49a4ffbedc85f8a89820173df12b111.tar.gz
linux-5c608d4dd49a4ffbedc85f8a89820173df12b111.tar.bz2
linux-5c608d4dd49a4ffbedc85f8a89820173df12b111.zip
Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"
This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read from the device. This is a valid read so revert the check for 0. Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio/addac')
-rw-r--r--drivers/staging/iio/addac/adt7316-i2c.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c
index ac91163656b5..2d51bd425662 100644
--- a/drivers/staging/iio/addac/adt7316-i2c.c
+++ b/drivers/staging/iio/addac/adt7316-i2c.c
@@ -30,10 +30,6 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data)
}
ret = i2c_smbus_read_byte(client);
-
- if (!ret)
- return -EIO;
-
if (ret < 0) {
dev_err(&cl->dev, "I2C read error\n");
return ret;