mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 07:34:03 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
eb2547db75
commit
71893bb077
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user