Commit aea7b1dc authored by Luis de Bethencourt's avatar Luis de Bethencourt Committed by Jonathan Cameron
Browse files

staging: iio: accel: add error check

Go to error_ret if sca3000_read_ctrl_reg() failed.
Signed-off-by: default avatarLuis de Bethencourt <>
Signed-off-by: default avatarJonathan Cameron <>
parent 7feae871
......@@ -1046,6 +1046,8 @@ static int sca3000_clean_setup(struct sca3000_state *st)
/* Disable ring buffer */
ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL);
if (ret < 0)
goto error_ret;
ret = sca3000_write_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment