Commit 8c6c5a69 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: gsc_hpdi: cleanup step 3 of me4000_ai_do_cmd_test()

Remove the dev_err() noise and convert the error handling to the
normal form (err |= -EINVAL) used in the do_cmdtest functions.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bf1b2022
......@@ -969,28 +969,23 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
if (err)
return 2;
/*
* Stage 3. Check if arguments are generally valid.
*/
/* Step 3: check if arguments are trivially valid */
if (cmd->chanlist_len < 1) {
dev_err(dev->class_dev, "No channel list\n");
cmd->chanlist_len = 1;
err++;
err |= -EINVAL;
}
if (init_ticks < 66) {
dev_err(dev->class_dev, "Start arg to low\n");
cmd->start_arg = 2000;
err++;
err |= -EINVAL;
}
if (scan_ticks && scan_ticks < 67) {
dev_err(dev->class_dev, "Scan begin arg to low\n");
cmd->scan_begin_arg = 2031;
err++;
err |= -EINVAL;
}
if (chan_ticks < 66) {
dev_err(dev->class_dev, "Convert arg to low\n");
cmd->convert_arg = 2000;
err++;
err |= -EINVAL;
}
if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment