staging: iio: accel: fix error check
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Wed, 22 Jun 2016 19:43:30 +0000 (20:43 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 26 Jun 2016 14:57:02 +0000 (15:57 +0100)
commitef3149eb3ddb7f9125e11c90f8330e371b55cffd
treeeec87d6d485fd16bf9b4bca1c55dfbb66c1eb0ac
parentdf013212a1b6557f071609983cab0612f71fd99b
staging: iio: accel: fix error check

sca3000_read_ctrl_reg() returns a negative number on failure, check for
this instead of zero.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/accel/sca3000_core.c