aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dm9000.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2007-05-07 07:13:25 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-08 01:15:15 -0400
commit9fd9f9b669ca71f7b3a7709d02d305c3d428d2fe (patch)
treea5633e6cb443ad7c51b567f06fa25453e114aa9d /drivers/net/dm9000.c
parentd17ecb23b2e5ca174c0f5ce6be42cb3909a02ed0 (diff)
DM9000: fix use of kfree() on net device
The DM9000 network driver is calling kfree() on an netdev causing the system to oops if the probe fails. The right thing to do is call free_netdev(). Thanks to Russell King for spotting this. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/dm9000.c')
-rw-r--r--drivers/net/dm9000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 8cc1174e7f64..0e338539b822 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -601,7 +601,7 @@ dm9000_probe(struct platform_device *pdev)
601 printk("%s: not found (%d).\n", CARDNAME, ret); 601 printk("%s: not found (%d).\n", CARDNAME, ret);
602 602
603 dm9000_release_board(pdev, db); 603 dm9000_release_board(pdev, db);
604 kfree(ndev); 604 free_netdev(ndev);
605 605
606 return ret; 606 return ret;
607} 607}
@@ -1193,7 +1193,7 @@ dm9000_drv_remove(struct platform_device *pdev)
1193 1193
1194 unregister_netdev(ndev); 1194 unregister_netdev(ndev);
1195 dm9000_release_board(pdev, (board_info_t *) ndev->priv); 1195 dm9000_release_board(pdev, (board_info_t *) ndev->priv);
1196 kfree(ndev); /* free device structure */ 1196 free_netdev(ndev); /* free device structure */
1197 1197
1198 PRINTK1("clean_module() exit\n"); 1198 PRINTK1("clean_module() exit\n");
1199 1199