diff options
author | Chase Southwood <chase.southwood@gmail.com> | 2014-07-11 04:02:27 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-12 00:38:42 (GMT) |
commit | 71893bb077a61c7b590bf7780422407a01a409c0 (patch) | |
tree | 2ab5ce698ee96e516e98cdfcd767d2eaf59d8eba /drivers | |
parent | eb2547db7525d14f67c6c4ad19b1ccfe14ef63ac (diff) | |
download | linux-71893bb077a61c7b590bf7780422407a01a409c0.tar.xz |
staging: comedi: addi_apci_1564: remove null check of devpriv in apci1564_detach()
There is no need to test whether devpriv is null in this function. The
check looks left over and we can just remove it.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/addi_apci_1564.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index e3dcab7..f91aedd 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -433,14 +433,10 @@ static int apci1564_auto_attach(struct comedi_device *dev, static void apci1564_detach(struct comedi_device *dev) { - struct apci1564_private *devpriv = dev->private; - - if (devpriv) { - if (dev->iobase) - apci1564_reset(dev); - if (dev->irq) - free_irq(dev->irq, dev); - } + if (dev->iobase) + apci1564_reset(dev); + if (dev->irq) + free_irq(dev->irq, dev); comedi_pci_disable(dev); } |