提交 71893bb0 编写于 作者: C Chase Southwood 提交者: Greg Kroah-Hartman

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: NChase Southwood <chase.southwood@gmail.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 eb2547db
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册