release/src/linux/linux/drivers/net/acenic.c
/*
 * Generic cleanup handling data allocated during init. Used when the
 * module is unloaded or if an error occurs during initialization
 */
Generic cleanup handling data allocated during init. Used when the
module is unloaded or if an error occurs during initialization
Generic cleanup handling data allocated during init . Used when the module is unloaded or if an error occurs during initialization
static void ace_init_cleanup(struct net_device *dev)
{
	struct ace_private *ap;
	ap = dev->priv;
	ace_free_descriptors(dev);
	if (ap->info)
		pci_free_consistent(ap->pdev, sizeof(struct ace_info),
				    ap->info, ap->info_dma);
	if (ap->skb)
		kfree(ap->skb);
	if (ap->trace_buf)
		kfree(ap->trace_buf);
	if (dev->irq)
		free_irq(dev->irq, dev);
	unregister_netdev(dev);
	iounmap(ap->regs);
}
static void ace_init_cleanup ( struct net_device * dev ) { struct ace_private * ap ; ap = dev -> priv ; ace_free_descriptors ( dev ) ; if ( ap -> info ) pci_free_consistent ( ap -> pdev , sizeof ( struct ace_info ) , ap -> info , ap -> info_dma ) ; if ( ap -> skb ) kfree ( ap -> skb ) ; if ( ap -> trace_buf ) kfree ( ap -> trace_buf ) ; if ( dev -> irq ) free_irq ( dev -> irq , dev ) ; unregister_netdev ( dev ) ; iounmap ( ap -> regs ) ; }
Generic cleanup handling data allocated during init.
Generic cleanup handling data allocated during init .