Commit 1dcea26a authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl818: remove unnecessary 'dev->irq' tests

These functions can only be called if the irq was sucessfully requested.
The dev->irq will always be valid.
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 35a8735d
...@@ -700,7 +700,7 @@ static irqreturn_t interrupt_pcl818(int irq, void *d) ...@@ -700,7 +700,7 @@ static irqreturn_t interrupt_pcl818(int irq, void *d)
outb(0, dev->iobase + PCL818_CLRINT); /* clear INT request */ 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!"); comedi_error(dev, "bad IRQ!");
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -762,10 +762,6 @@ static int pcl818_ai_cmd_mode(int mode, struct comedi_device *dev, ...@@ -762,10 +762,6 @@ static int pcl818_ai_cmd_mode(int mode, struct comedi_device *dev,
unsigned int seglen; unsigned int seglen;
dev_dbg(dev->class_dev, "pcl818_ai_cmd_mode()\n"); 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) if (devpriv->irq_blocked)
return -EBUSY; return -EBUSY;
......
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