summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_buf.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-10 10:37:27 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 16:56:00 -0800
commita8f40f463fda58b90206173be73dc199beb7395f (patch)
treef4b974f5f1b70192b34da691515572e1043c29b0 /drivers/staging/comedi/comedi_buf.c
parent305a6f3896350bbfa59c0021f59600bbbb2e9590 (diff)
downloadop-kernel-dev-a8f40f463fda58b90206173be73dc199beb7395f.zip
op-kernel-dev-a8f40f463fda58b90206173be73dc199beb7395f.tar.gz
staging: comedi: comedi_buf: remove unreachable dev_warn in comedi_buf_munge()
Due to the 'while(count < num_bytes)' the computed 'block_size' will always be a value greater than 0. Remove the unreachable dev_warn and the (block_size < 0) test. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbobbi@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_buf.c')
-rw-r--r--drivers/staging/comedi/comedi_buf.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
index 7d516a0..9d11f416 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -215,13 +215,6 @@ static unsigned int comedi_buf_munge(struct comedi_async *async,
int block_size = num_bytes - count;
unsigned int buf_end;
- if (block_size < 0) {
- dev_warn(s->device->class_dev,
- "%s: %s: bug! block_size is negative\n",
- __FILE__, __func__);
- break;
- }
-
buf_end = async->prealloc_bufsz - async->munge_ptr;
if (block_size > buf_end)
block_size = buf_end;
OpenPOWER on IntegriCloud