From: Ian Abbott Date: Mon, 12 Oct 2015 16:21:26 +0000 (+0100) Subject: staging: comedi: remove superfluous retval = 0 in comedi_read() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f84e27adfc4cb0c4aa97d830c43f8c82aca0547c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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) {