Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jeremy Fertic and committed by
Jonathan Cameron
5c608d4d c3e566c8

-4
-4
drivers/staging/iio/addac/adt7316-i2c.c
··· 30 30 } 31 31 32 32 ret = i2c_smbus_read_byte(client); 33 - 34 - if (!ret) 35 - return -EIO; 36 - 37 33 if (ret < 0) { 38 34 dev_err(&cl->dev, "I2C read error\n"); 39 35 return ret;