diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-01-10 17:36:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-18 00:56:00 (GMT) |
commit | 305a6f3896350bbfa59c0021f59600bbbb2e9590 (patch) | |
tree | fce6a8695d060bcef1e947e9b846548ddb104c50 /drivers/staging/comedi/comedi_buf.c | |
parent | 8ae560a14abaf2b76fb486ad08fea9c6c5be640f (diff) | |
download | linux-305a6f3896350bbfa59c0021f59600bbbb2e9590.tar.xz |
staging: comedi: comedi_buf: remove BUG_ON in comedi_buf_munge()
The condition that would trigger this BUG_ON can never occur.
The 'munge_count' will be equal to 'buf_write_count' if all the data
in the buffer has been munged.
Or, the 'munge_count' will be less than the 'buf_write_count' if any
partial samples in the buffer were not munged.
The 'munge_count' will never be greater than the 'buf_write_count'.
Remove the unnecessary BUG_ON.
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.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index ac5f0a9..7d516a0 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -245,7 +245,6 @@ static unsigned int comedi_buf_munge(struct comedi_async *async, } } - BUG_ON((int)(async->munge_count - async->buf_write_count) > 0); return count; } |