Commit 3b555abf authored by Alexander Viro's avatar Alexander Viro Committed by Stephen Hemminger

[netdrvr] s/kfree/free_netdev/ where appropriate

parent 7ce103b4
......@@ -1213,7 +1213,7 @@ struct net_device * __init ltpc_probe(void)
out2:
release_region(io, 8);
out1:
kfree(dev);
free_netdev(dev);
out:
return ERR_PTR(err);
}
......
......@@ -722,7 +722,7 @@ static int __init am79c961_init(void)
release:
release_region(dev->base_addr, 0x18);
nodev:
kfree(dev);
free_netdev(dev);
out:
return ret;
}
......
......@@ -1068,7 +1068,7 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
release:
release_region(dev->base_addr, 16);
release_region(dev->base_addr + 0x800, 4096);
kfree(dev);
free_netdev(dev);
out:
return ret;
}
......
......@@ -908,7 +908,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
failed:
release_region(dev->base_addr, 128);
free:
kfree(dev);
free_netdev(dev);
out:
return ret;
}
......
......@@ -705,7 +705,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
release:
release_region(dev->base_addr, 16);
free:
kfree(dev);
free_netdev(dev);
out:
return ret;
}
......
......@@ -1401,7 +1401,7 @@ static int __init init_baycomepp(void)
if (register_netdev(dev)) {
printk(KERN_WARNING "%s: cannot register net device %s\n", bc_drvname, dev->name);
kfree(dev);
free_netdev(dev);
break;
}
if (set_hw && baycom_setmode(dev->priv, mode[i]))
......
......@@ -547,7 +547,7 @@ static int bpq_new_device(struct net_device *edev)
error:
dev_put(edev);
kfree(ndev);
free_netdev(ndev);
return err;
}
......
......@@ -832,7 +832,7 @@ struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops,
if (err < 0) {
printk(KERN_WARNING "hdlcdrv: cannot register net "
"device %s\n", dev->name);
kfree(dev);
free_netdev(dev);
dev = ERR_PTR(err);
}
return dev;
......
......@@ -1192,7 +1192,7 @@ static void __exit yam_cleanup_driver(void)
struct net_device *dev = yam_devs[i];
if (dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
}
}
......
......@@ -730,7 +730,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
#endif
pci_release_regions (pdev);
err_out:
kfree (dev);
free_netdev (dev);
DPRINTK ("EXIT, returning %d\n", rc);
return rc;
}
......
......@@ -332,7 +332,7 @@ int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if((i = xl_init(dev))) {
iounmap(xl_priv->xl_mmio) ;
kfree(dev) ;
free_netdev(dev) ;
pci_release_regions(pdev) ;
return i ;
}
......@@ -352,7 +352,7 @@ int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
printk(KERN_ERR "3C359, register netdev failed\n") ;
pci_set_drvdata(pdev,NULL) ;
iounmap(xl_priv->xl_mmio) ;
kfree(dev) ;
free_netdev(dev) ;
pci_release_regions(pdev) ;
return i ;
}
......
......@@ -181,7 +181,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
err_out_region:
release_region(pci_ioaddr, ABYSS_IO_EXTENT);
err_out_trdev:
kfree(dev);
free_netdev(dev);
return ret;
}
......
......@@ -197,7 +197,7 @@ static int __init madgemc_probe(void)
card = kmalloc(sizeof(struct madgemc_card), GFP_KERNEL);
if (card==NULL) {
printk("madgemc: unable to allocate card struct\n");
kfree(dev);
free_netdev(dev);
if (madgemc_card_list)
return 0;
return -1;
......@@ -360,7 +360,7 @@ static int __init madgemc_probe(void)
kfree(card);
tmsdev_term(dev);
kfree(dev);
free_netdev(dev);
if (madgemc_card_list)
return 0;
return -1;
......@@ -399,7 +399,7 @@ static int __init madgemc_probe(void)
MADGEMC_IO_EXTENT);
getout1:
kfree(card);
kfree(dev);
free_netdev(dev);
slot++;
}
......
......@@ -179,7 +179,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
err_out_region:
release_region(pci_ioaddr, TMS_PCI_IO_EXTENT);
err_out_trdev:
kfree(dev);
free_netdev(dev);
return ret;
}
......
......@@ -2084,7 +2084,7 @@ static int __devinit de_init_one (struct pci_dev *pdev,
err_out_disable:
pci_disable_device(pdev);
err_out_free:
kfree(dev);
free_netdev(dev);
return rc;
}
......
......@@ -457,7 +457,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
pci_disable_device(pdev);
err_out_free:
pci_set_drvdata(pdev, NULL);
kfree(dev);
free_netdev(dev);
return err;
}
......
......@@ -1725,7 +1725,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
pci_release_regions (pdev);
err_out_free_netdev:
kfree (dev);
free_netdev (dev);
return -ENODEV;
}
......
......@@ -530,7 +530,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
#endif
pci_release_regions(pdev);
err_out_netdev:
kfree (dev);
free_netdev (dev);
return -ENODEV;
}
......
......@@ -94,7 +94,7 @@ static struct x25_asy *x25_asy_alloc(void)
return sl;
} else {
printk("x25_asy_alloc() - register_netdev() failure.\n");
kfree(dev);
free_netdev(dev);
}
}
return NULL;
......
......@@ -1443,7 +1443,7 @@ struct net_device *init_atmel_card( unsigned short irq, int port, char *firmware
err_out_irq:
free_irq(dev->irq, dev);
err_out_free:
kfree(dev);
free_netdev(dev);
return NULL;
}
......
......@@ -2564,7 +2564,7 @@ static void strip_free(struct strip *strip_info)
strip_info->magic = 0;
kfree(strip_info->dev);
free_netdev(strip_info->dev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment