void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice *s)
{
- if (s->private) {
- /* this test does nothing, so comment it out
- * if (subdevpriv->have_irq) {
- * }
- */
-
- kfree(s->private);
- }
+ kfree(s->private);
}
EXPORT_SYMBOL(subdev_8255_cleanup);
}
if (devpriv->dma_chan)
free_dma(devpriv->dma_chan);
- if (devpriv->user_ai_range_table)
- kfree(devpriv->user_ai_range_table);
- if (devpriv->user_ao_range_table)
- kfree(devpriv->user_ao_range_table);
+ kfree(devpriv->user_ai_range_table);
+ kfree(devpriv->user_ao_range_table);
}
if (dev->irq)
if (devpriv) {
if (devpriv->dma)
free_dma(devpriv->dma);
- if (devpriv->dma_buffer)
- kfree(devpriv->dma_buffer);
+ kfree(devpriv->dma_buffer);
}
return 0;
subdev_8255_cleanup(dev, dev->subdevices + 2);
/* only free stuff if it has been allocated by _attach */
- if (devpriv->dma_buffer)
- kfree(devpriv->dma_buffer);
+ kfree(devpriv->dma_buffer);
if (devpriv->dma_chan)
free_dma(devpriv->dma_chan);
if (dev->irq)
printk("comedi%d: serial2002: remove\n", dev->minor);
for (i = 0; i < 5; i++) {
s = &dev->subdevices[i];
- if (s->maxdata_list) {
- kfree(s->maxdata_list);
- }
- if (s->range_table_list) {
- kfree(s->range_table_list);
- }
+ kfree(s->maxdata_list);
+ kfree(s->range_table_list);
}
return 0;
}
usbduxsub_unlink_OutURBs(usbduxsub_tmp);
}
for (i = 0; i < usbduxsub_tmp->numOfOutBuffers; i++) {
- if (usbduxsub_tmp->urbOut[i]->transfer_buffer) {
- kfree(usbduxsub_tmp->
- urbOut[i]->transfer_buffer);
- usbduxsub_tmp->urbOut[i]->transfer_buffer =
- NULL;
- }
+ kfree(usbduxsub_tmp->urbOut[i]->transfer_buffer);
+ usbduxsub_tmp->urbOut[i]->transfer_buffer = NULL;
if (usbduxsub_tmp->urbOut[i]) {
usb_kill_urb(usbduxsub_tmp->urbOut[i]);
usb_free_urb(usbduxsub_tmp->urbOut[i]);