]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ni_stc.h: remove unreachable code in RTSI_Output_Bit()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:59:13 +0000 (14:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:11 +0000 (19:05 +0200)
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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_stc.h

index e6be68cf47a0923ed1898b48ea891da316b3b50b..e81caa88f5cf262696b1a3519f5a90953ac3febc 100644 (file)
@@ -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);
 }