staging: iio: tsl2583: check for error code from i2c_smbus_read_byte()
authorBrian Masney <masneyb@onstation.org>
Fri, 28 Oct 2016 10:00:13 +0000 (06:00 -0400)
committerJonathan Cameron <jic23@kernel.org>
Tue, 1 Nov 2016 18:50:04 +0000 (18:50 +0000)
commit9d5f36d2419e488dfa6ba38e4cfc1e90f65a4cff
treee5d9f37b32e36904fde581d18b052e380fc5a86f
parenta3b6b4b63beda16f3e91fdd942bbaaaf6b1f8b25
staging: iio: tsl2583: check for error code from i2c_smbus_read_byte()

taos_i2c_read() and taos_als_calibrate() does not check to see if the
value returned by i2c_smbus_read_byte() was an error code. This patch
adds the appropriate error handling.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c