staging: comedi: mpc624: remove unnecessary test
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 26 Nov 2013 23:42:09 +0000 (16:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 17:20:22 +0000 (09:20 -0800)
It's not necessaary to vaidate insn->n passed to the (*insn_read)
function. The for() loop following it will just be a NOP.

Remove the test as well as the printk noise.

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>
drivers/staging/comedi/drivers/mpc624.c

index 2d6add4f97f777dbd2c6b83dae642c06b8771de4..b105dd98c358f6b219c14a3f3bb4f1ac529b5d6d 100644 (file)
@@ -159,10 +159,6 @@ static int mpc624_ai_rinsn(struct comedi_device *dev,
         *  We always write 0 to GNSWA bit, so the channel range is +-/10.1Vdc
         */
        outb(insn->chanspec, dev->iobase + MPC624_GNMUXCH);
-       if (!insn->n) {
-               printk(KERN_INFO "MPC624: Warning, no data to acquire\n");
-               return 0;
-       }
 
        for (n = 0; n < insn->n; n++) {
                /*  Trigger the conversion */