iio: ad9523: fix a missing check of return value
authorKangjie Lu <kjlu@umn.edu>
Thu, 20 Dec 2018 07:21:22 +0000 (01:21 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 5 Jan 2019 16:10:50 +0000 (16:10 +0000)
commitae0b3773721f08526c850e2d8dec85bdb870cd12
tree1b0925b73f1cf2582567206bd5d648a4ab0f205f
parentc546d49656143855093c7b7fde60866e6e23a69d
iio: ad9523: fix a missing check of return value

If ad9523_write() fails, indio_dev may get incorrect data. The fix
inserts a check for the return value of ad9523_write(), and it fails,
returns an error.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/frequency/ad9523.c