iio: isl29018: fix to return error or 0 in isl29018_write_raw()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 8 Nov 2012 09:05:00 +0000 (09:05 +0000)
committerJonathan Cameron <jic23@kernel.org>
Mon, 19 Nov 2012 22:22:04 +0000 (22:22 +0000)
We had assigned the return value to 'ret' but ignored it when
return from isl29018_write_raw(), it's better to return 'ret'
instead of 0.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/isl29018.c

index 3b03f6f5c40cb55ad684923a2811db7e851105b9..1d5b294d6e6104c94b0cdec9b9bd3c48d991ea31 100644 (file)
@@ -356,7 +356,7 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
        }
        mutex_unlock(&chip->lock);
 
-       return 0;
+       return ret;
 }
 
 static int isl29018_read_raw(struct iio_dev *indio_dev,