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