All the callers of this function check the 'channel' number with
num_configurable_rtsi_channels(). This check can never occure.
Remove it.

Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/staging/comedi/drivers/ni_stc.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
b/drivers/staging/comedi/drivers/ni_stc.h
index e6be68c..e81caa8 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -352,10 +352,6 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, 
int is_mseries)
                base_bit_shift = 9;
                max_channel = 6;
        }
-       if (channel > max_channel) {
-               pr_err("%s: bug, invalid RTSI_channel=%i\n", __func__, channel);
-               return 0;
-       }
        return 1 << (base_bit_shift + channel);
 }
 
-- 
2.3.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to