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


Groups > linux.kernel > #1244886

[PATCH 07/10] staging: comedi: remove superfluous retval = 0 in comedi_read()

From Ian Abbott <abbotti@mev.co.uk>
Newsgroups linux.kernel
Subject [PATCH 07/10] staging: comedi: remove superfluous retval = 0 in comedi_read()
Date 2015-10-12 18:30 +0200
Message-ID <qiO95-4kn-45@gated-at.bofh.it> (permalink)
References <qiO94-4kn-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


`comedi_read()` initializes `retval` to 0.  The other `retval = 0`
assignments are superfluous, so remove them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/comedi_fops.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index b534b49..9505a34 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2503,8 +2503,6 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
 			if (!comedi_is_runflags_running(runflags)) {
 				if (comedi_is_runflags_in_error(runflags))
 					retval = -EPIPE;
-				else
-					retval = 0;
 				become_nonbusy = true;
 				break;
 			}
@@ -2518,7 +2516,6 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
 				break;
 			}
 			if (!s->busy) {
-				retval = 0;
 				break;
 			}
 			if (s->busy != file) {
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] staging: comedi: some comedi_read() changes Ian Abbott <abbotti@mev.co.uk> - 2015-10-12 18:30 +0200
  [PATCH 01/10] staging: comedi: remain busy until read end-of-file Ian Abbott <abbotti@mev.co.uk> - 2015-10-12 18:30 +0200
  [PATCH 07/10] staging: comedi: remove superfluous retval = 0 in comedi_read() Ian Abbott <abbotti@mev.co.uk> - 2015-10-12 18:30 +0200
  [PATCH 02/10] staging: comedi: don't consider "unmunged" data when becoming non-busy Ian Abbott <abbotti@mev.co.uk> - 2015-10-12 18:30 +0200
  [PATCH 04/10] staging: comedi: make some variables unsigned in comedi_read() Ian Abbott <abbotti@mev.co.uk> - 2015-10-12 18:30 +0200
  [PATCH 03/10] staging: comedi: do extra checks for becoming non-busy for "read" Ian Abbott <abbotti@mev.co.uk> - 2015-10-12 18:30 +0200
  RE: [PATCH 00/10] staging: comedi: some comedi_read() changes Hartley Sweeten <HartleyS@visionengravers.com> - 2015-10-12 19:10 +0200

csiph-web