[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1471110178.183857783@decadent.org.uk>
Date: Sat, 13 Aug 2016 18:42:58 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Jonathan Cameron" <jic23@...nel.org>,
"Luis de Bethencourt" <luisbg@....samsung.com>
Subject: [PATCH 3.2 71/94] staging: iio: accel: fix error check
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Luis de Bethencourt <luisbg@....samsung.com>
commit ef3149eb3ddb7f9125e11c90f8330e371b55cffd upstream.
sca3000_read_ctrl_reg() returns a negative number on failure, check for
this instead of zero.
Signed-off-by: Luis de Bethencourt <luisbg@....samsung.com>
Signed-off-by: Jonathan Cameron <jic23@...nel.org>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/staging/iio/accel/sca3000_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/iio/accel/sca3000_core.c
+++ b/drivers/staging/iio/accel/sca3000_core.c
@@ -579,7 +579,7 @@ static ssize_t sca3000_read_frequency(st
goto error_ret_mut;
ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL);
mutex_unlock(&st->lock);
- if (ret)
+ if (ret < 0)
goto error_ret;
val = ret;
if (base_freq > 0)
Powered by blists - more mailing lists