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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Luis de Bethencourt 2016-06-22 20:43:30 +01:00 • committed by Greg Kroah-Hartman
commit 601818bdd4