From: H Hartley Sweeten Date: Fri, 1 May 2015 21:59:13 +0000 (-0700) Subject: staging: comedi: ni_stc.h: remove unreachable code in RTSI_Output_Bit() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e2bdb0d833655b09d7ae75b7ca4eafde22fda9a4;p=linux-beck.git staging: comedi: ni_stc.h: remove unreachable code in RTSI_Output_Bit() 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index e6be68cf47a0..e81caa88f5cf 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); }