iio: accel: kxsd9: fix the usage of spi_w8r8()
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Jun 2016 13:22:24 +0000 (15:22 +0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:13:43 +0000 (13:13 +0000)
commitc2db55b8f16a79508b67a5664f547548ce8fbbad
tree52204e6d240b730ff95265b8d1f4f8343f365b22
parentee389c0c85e7a0b4d1bdc926c96a92cf0e7cd187
iio: accel: kxsd9: fix the usage of spi_w8r8()

commit 0c1f91b98552da49d9d8eed32b3132a58d2f4598 upstream.

These two spi_w8r8() calls return a value with is used by the code
following the error check. The dubious use was caused by a cleanup
patch.

Fixes: d34dbee8ac8e ("staging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/iio/accel/kxsd9.c