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

staging: comedi: rtd520: remove unnecessary interrupt disable

The read/write of the PLX_INTRCS_REG during the driver detach is not
necessary. The rtd_reset() function writes 0 to this register which
will disable all interrupts.

This also fixes a dereference after null check reported by coverity.

Reported-by: coverity (CID 751066)
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f5fc964
...@@ -1299,12 +1299,8 @@ static void rtd_detach(struct comedi_device *dev) ...@@ -1299,12 +1299,8 @@ static void rtd_detach(struct comedi_device *dev)
/* Shut down any board ops by resetting it */ /* Shut down any board ops by resetting it */
if (dev->mmio && devpriv->lcfg) if (dev->mmio && devpriv->lcfg)
rtd_reset(dev); rtd_reset(dev);
if (dev->irq) { if (dev->irq)
writel(readl(devpriv->lcfg + PLX_INTRCS_REG) &
~(ICS_PLIE | ICS_DMA0_E | ICS_DMA1_E),
devpriv->lcfg + PLX_INTRCS_REG);
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
}
if (dev->mmio) if (dev->mmio)
iounmap(dev->mmio); iounmap(dev->mmio);
if (devpriv->las1) if (devpriv->las1)
......
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