Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431523 > unrolled thread

Re: [RESEND PATCH v2 1/2] staging: iio: accel: fix error check

Started byJonathan Cameron <jic23@kernel.org>
First post2016-06-26 17:00 +0200
Last post2016-06-26 17:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RESEND PATCH v2 1/2] staging: iio: accel: fix error check Jonathan Cameron <jic23@kernel.org> - 2016-06-26 17:00 +0200

#1431523 — Re: [RESEND PATCH v2 1/2] staging: iio: accel: fix error check

FromJonathan Cameron <jic23@kernel.org>
Date2016-06-26 17:00 +0200
SubjectRe: [RESEND PATCH v2 1/2] staging: iio: accel: fix error check
Message-ID<rOjHs-4cP-11@gated-at.bofh.it>
On 22/06/16 20:43, Luis de Bethencourt wrote:
> 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>
> Reviewed-by: Andrew F. Davis <afd@ti.com>
> Reviewed-by: Jonathan Cameron <jic23@kernel.org>

Note that, like any tag, reviewed-by tags must be provided by the person
who did the review.  It's nice to acknowledge reviewers, but there is
a certain "I'm happy with the result of my review" that is associated
with a reviewed-by tag.

Marked for stable and applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan

> ---
>  drivers/staging/iio/accel/sca3000_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
> index a8f533a..ec12181 100644
> --- a/drivers/staging/iio/accel/sca3000_core.c
> +++ b/drivers/staging/iio/accel/sca3000_core.c
> @@ -594,7 +594,7 @@ static ssize_t sca3000_read_frequency(struct device *dev,
>  		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)
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web