diff options
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pci224.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index d9836879355..b41e5e5963a 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -1536,20 +1536,12 @@ static int pci224_detach(struct comedi_device *dev) s = dev->subdevices + 0; /* AO subdevice */ - if (s->range_table_list) { - kfree(s->range_table_list); - } + kfree(s->range_table_list); } if (devpriv) { - if (devpriv->ao_readback) { - kfree(devpriv->ao_readback); - } - if (devpriv->ao_scan_vals) { - kfree(devpriv->ao_scan_vals); - } - if (devpriv->ao_scan_order) { - kfree(devpriv->ao_scan_order); - } + kfree(devpriv->ao_readback); + kfree(devpriv->ao_scan_vals); + kfree(devpriv->ao_scan_order); if (devpriv->pci_dev) { if (dev->iobase) { comedi_pci_disable(devpriv->pci_dev); |