From: H Hartley Sweeten Date: Thu, 10 Jan 2013 17:37:27 +0000 (-0700) Subject: staging: comedi: comedi_buf: remove unreachable dev_warn in comedi_buf_munge() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8f40f463fda58b90206173be73dc199beb7395f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index 7d516a07474b..9d11f4163984 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;