staging: comedi: comedi_buf: remove BUG_ON in comedi_buf_munge()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 10 Jan 2013 17:36:58 +0000 (10:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:56:00 +0000 (16:56 -0800)
commit305a6f3896350bbfa59c0021f59600bbbb2e9590
treefce6a8695d060bcef1e947e9b846548ddb104c50
parent8ae560a14abaf2b76fb486ad08fea9c6c5be640f
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>
drivers/staging/comedi/comedi_buf.c