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>
This commit is contained in:
John Syne 2018-03-23 11:22:10 -03:00 • committed by Jonathan Cameron
commit 4297b23d92
2 changed files with 17 additions and 17 deletions