staging: iio: accel: fix error check

commit ef3149eb3d upstream.

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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Luis de Bethencourt 2016-06-22 20:43:30 +01:00 • committed by Ben Hutchings
commit a0e025caed