staging: comedi: ni_labpc: remove unnecessary test of dev->irq
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 22 Mar 2013 16:47:20 +0000 (09:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 18:42:57 +0000 (11:42 -0700)
The ai subdevice (*do_cmd) pointer is only initialized if the
driver has successfully requested the interrupt. The extra test
in labpc_ai_cmd() is not necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_labpc.c

index f9c720938e2780e5a3b0845aecf4b97360cc7a21..56d60847f820cb1e72a7c856c14988a286e60d09 100644 (file)
@@ -858,11 +858,6 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        enum scan_mode mode;
        unsigned long flags;
 
-       if (!dev->irq) {
-               comedi_error(dev, "no irq assigned, cannot perform command");
-               return -1;
-       }
-
        range = CR_RANGE(cmd->chanlist[0]);
        aref = CR_AREF(cmd->chanlist[0]);