From f84e27adfc4cb0c4aa97d830c43f8c82aca0547c Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 12 Oct 2015 17:21:26 +0100 Subject: [PATCH] staging: comedi: remove superfluous retval = 0 in comedi_read() `comedi_read()` initializes `retval` to 0. The other `retval = 0` assignments are superfluous, so remove them. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- 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 a979f621f932..88ba0b648805 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2504,8 +2504,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; } @@ -2519,7 +2517,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.34.1