aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-05-01 14:59:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-09 19:05:11 +0200
commite2bdb0d833655b09d7ae75b7ca4eafde22fda9a4 (patch)
treefee2e247f588c01b25d4c40ee3ca1e150381e56b
parentstaging: comedi: ni_stc.h: tidy up IO_Bidirection_Pin_Register (diff)
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 <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/ni_stc.h4
1 files changed, 0 insertions, 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);
}