From: H Hartley Sweeten Date: Wed, 23 Apr 2014 22:52:32 +0000 (-0700) Subject: staging: comedi: me4000: remove unnecessary Step 2b test in (*do_cmdtest) X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8f266f47c2c9fc17b0271a06d6eb321bee44980c;p=linux-beck.git staging: comedi: me4000: remove unnecessary Step 2b test in (*do_cmdtest) This test is unnecessary. It covers all the possible combinations of the scan_end_src and stop_src triggers so the final else can never be reached. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index f43221fcd15e..5fc4850afb74 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -902,17 +902,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev, err |= -EINVAL; } - if (cmd->stop_src == TRIG_NONE && cmd->scan_end_src == TRIG_NONE) { - } else if (cmd->stop_src == TRIG_COUNT && - cmd->scan_end_src == TRIG_NONE) { - } else if (cmd->stop_src == TRIG_NONE && - cmd->scan_end_src == TRIG_COUNT) { - } else if (cmd->stop_src == TRIG_COUNT && - cmd->scan_end_src == TRIG_COUNT) { - } else { - err |= -EINVAL; - } - if (err) return 2;