summaryrefslogtreecommitdiff
path: root/drivers/iio/kfifo_buf.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-19 01:33:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-19 01:33:09 +0300
commit909eacd748b3c8d15e6a239aa67f7828885d798e (patch)
tree87f88e6c53800a3f9b8cc0867845cf116c7416fe /drivers/iio/kfifo_buf.c
parentaa519be34f45954f33a6c20430deac8e544a180f (diff)
parente26081808edadfd257c6c9d81014e3b25e9a6118 (diff)
downloadlinux-909eacd748b3c8d15e6a239aa67f7828885d798e.tar.xz
Merge 4.1-rc4 into usb-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/kfifo_buf.c')
-rw-r--r--drivers/iio/kfifo_buf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/kfifo_buf.c b/drivers/iio/kfifo_buf.c
index 847ca561afe0..55c267bbfd2f 100644
--- a/drivers/iio/kfifo_buf.c
+++ b/drivers/iio/kfifo_buf.c
@@ -38,7 +38,8 @@ static int iio_request_update_kfifo(struct iio_buffer *r)
kfifo_free(&buf->kf);
ret = __iio_allocate_kfifo(buf, buf->buffer.bytes_per_datum,
buf->buffer.length);
- buf->update_needed = false;
+ if (ret >= 0)
+ buf->update_needed = false;
} else {
kfifo_reset_out(&buf->kf);
}