diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-05-04 14:43:11 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:36:06 -0700 |
commit | 8474ddd7cba04c2e8d8691abda32ae0f4a684137 (patch) | |
tree | 823b54d3fd0d47e25f68b185c2f6fa34e857842a /drivers/staging/iio | |
parent | 3bf877c1cc0d17ef471f21ae319fcb9c9211df61 (diff) | |
download | talos-obmc-linux-8474ddd7cba04c2e8d8691abda32ae0f4a684137.tar.gz talos-obmc-linux-8474ddd7cba04c2e8d8691abda32ae0f4a684137.zip |
staging:iio:ring_sw: Fix incorrect test on successful read of last value, causes infinite loop
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/ring_sw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index f8de45dc4b6e..5ee3e4533515 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -295,7 +295,7 @@ again: return -EAGAIN; memcpy(data, last_written_p_copy, ring->buf.bpd); - if (unlikely(ring->last_written_p >= last_written_p_copy)) + if (unlikely(ring->last_written_p != last_written_p_copy)) goto again; iio_unmark_sw_rb_in_use(&ring->buf); |