staging:iio:ade7854: Fix error handling on read/write
authorJohn Syne <rodrigosiqueiramelo@gmail.com>
Fri, 23 Mar 2018 14:22:10 +0000 (11:22 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Mar 2018 12:37:02 +0000 (12:37 +0000)
commit4297b23d927fa5265378f4a71372ecef3c33023a
treea74d40cff90baff4394bbbca64da98f108dcafdd
parent211d71af696cba4fbaacd87931ce07fc61413775
staging:iio:ade7854: Fix error handling on read/write

The original code does not correctly handle the error related to I2C
read and write. This patch fixes the error handling related to all
read/write functions for I2C.

Signed-off-by: John Syne <john3909@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fixes: 8d97a5877 ("staging: iio: meter: new driver for ADE7754 devices")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/meter/ade7854-i2c.c
drivers/staging/iio/meter/ade7854.c