staging: comedi: amplc_dio200_common: remove some tests from amplc_dio200_common_detach()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 25 Jul 2014 17:07:08 +0000 (18:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jul 2014 23:47:44 +0000 (16:47 -0700)
`amplc_dio200_common_detach()` doesn't do much apart from freeing the
IRQ handler that was requested by `amplc_dio200_common_attach()` if
`dev->irq` is non-zero.  There is no need to check if the pointer to
the constant board data or the pointer to private per-device data
exist, so remove those tests.

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

index 3592e58c57d5c5462f80657ca5e7ac7be86178d5..4cf9e9ed71d4726b23471757319e07c95bbce075 100644 (file)
@@ -1197,11 +1197,6 @@ EXPORT_SYMBOL_GPL(amplc_dio200_common_attach);
 
 void amplc_dio200_common_detach(struct comedi_device *dev)
 {
-       const struct dio200_board *thisboard = comedi_board(dev);
-       struct dio200_private *devpriv = dev->private;
-
-       if (!thisboard || !devpriv)
-               return;
        if (dev->irq) {
                free_irq(dev->irq, dev);
                dev->irq = 0;