From e2bdb0d833655b09d7ae75b7ca4eafde22fda9a4 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 1 May 2015 14:59:13 -0700 Subject: [PATCH] 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 --- 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 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); } -- 2.39.5