staging: iio: adis16060_core: Fix error handling
authorCristina Moraru <cristina.moraru09@gmail.com>
Sun, 25 Oct 2015 21:31:41 +0000 (23:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 05:49:09 +0000 (14:49 +0900)
commit31a99443a53aa65cdaaaaa3bcd5ed685eec87419
treec2708fe49680cb1af84f2ad8b4e2870c71208873
parent1c58f0eb9cd48c8b3426df1b073da796623c2b45
staging: iio: adis16060_core: Fix error handling

We need to check adis16060_spi_read return code to avoid feeding user
space with bogus data.
While, at it introduce out_unlock label in order to simplify locking
on error path.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/gyro/adis16060_core.c