From: H Hartley Sweeten Date: Tue, 11 Sep 2012 01:58:29 +0000 (-0700) Subject: staging: comedi: adl_pci9111: remove chanlist_len checks X-Git-Tag: next-20120912~22^2~80 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e6e69aa1306c5daa3f4a5e7b88b784b68b5cb00c;p=karo-tx-linux.git staging: comedi: adl_pci9111: remove chanlist_len checks The chanlist_len is validated by the comedi core before calling the do_cmdtest function. Remove these redundant checks. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 349ca0e2ba65..ba8d7945ab25 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -514,16 +514,6 @@ pci9111_ai_do_cmd_test(struct comedi_device *dev, /* Step 3 : make sure arguments are trivialy compatible */ - if (cmd->chanlist_len < 1) { - cmd->chanlist_len = 1; - error++; - } - - if (cmd->chanlist_len > board->ai_channel_nbr) { - cmd->chanlist_len = board->ai_channel_nbr; - error++; - } - if ((cmd->start_src == TRIG_NOW) && (cmd->start_arg != 0)) { cmd->start_arg = 0; error++;