staging: comedi: pcl818: remove unnecessary 'dev->irq' tests
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 3 Dec 2013 19:07:16 +0000 (12:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 23:25:31 +0000 (15:25 -0800)
These functions can only be called if the irq was sucessfully requested.
The dev->irq will always be valid.

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/pcl818.c

index 3dac1dd..5fc4708 100644 (file)
@@ -700,7 +700,7 @@ static irqreturn_t interrupt_pcl818(int irq, void *d)
 
        outb(0, dev->iobase + PCL818_CLRINT);   /* clear INT request */
 
-       if (!dev->irq || !devpriv->irq_blocked || !devpriv->ai_mode) {
+       if (!devpriv->irq_blocked || !devpriv->ai_mode) {
                comedi_error(dev, "bad IRQ!");
                return IRQ_NONE;
        }
@@ -762,10 +762,6 @@ static int pcl818_ai_cmd_mode(int mode, struct comedi_device *dev,
        unsigned int seglen;
 
        dev_dbg(dev->class_dev, "pcl818_ai_cmd_mode()\n");
-       if (!dev->irq) {
-               comedi_error(dev, "IRQ not defined!");
-               return -EINVAL;
-       }
 
        if (devpriv->irq_blocked)
                return -EBUSY;