All of lore.kernel.org
 help / color / mirror / Atom feed
From: <michael.hennerich@analog.com>
To: jic23@cam.ac.uk
Cc: linux-iio@vger.kernel.org, drivers@analog.com,
	Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH] staging: iio: iio_ring_rip_outer return immediately if rip_lots returns <= 0
Date: Thu, 7 Oct 2010 12:41:30 +0200	[thread overview]
Message-ID: <1286448090-4792-2-git-send-email-michael.hennerich@analog.com> (raw)
In-Reply-To: <1286448090-4792-1-git-send-email-michael.hennerich@analog.com>

From: Michael Hennerich <michael.hennerich@analog.com>


Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/industrialio-ring.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/iio/industrialio-ring.c b/drivers/staging/iio/industrialio-ring.c
index edcf6be..d393ace 100644
--- a/drivers/staging/iio/industrialio-ring.c
+++ b/drivers/staging/iio/industrialio-ring.c
@@ -105,7 +105,7 @@ static ssize_t iio_ring_rip_outer(struct file *filp, char __user *buf,
 		return -EINVAL;
 	copied = rb->access.rip_lots(rb, count, &data, &dead_offset);
 
-	if (copied < 0) {
+	if (copied <= 0) {
 		ret = copied;
 		goto error_ret;
 	}
-- 
1.6.0.2

  reply	other threads:[~2010-10-07 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 10:41 staging: iio: iio_ring_rip_outer return immediately if rip_lots returns <= 0 michael.hennerich
2010-10-07 10:41 ` michael.hennerich [this message]
2010-10-07 11:28   ` [PATCH] " Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2010-10-07 11:27 michael.hennerich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286448090-4792-2-git-send-email-michael.hennerich@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=drivers@analog.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.