From: H Hartley Sweeten Date: Tue, 3 Dec 2013 19:07:16 +0000 (-0700) Subject: staging: comedi: pcl818: remove unnecessary 'dev->irq' tests X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1dcea26a226c18cb843014d1f68d88a89c784912;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index 3dac1dd1372f..5fc470800b01 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c @@ -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;