Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fd9f9b669ca71f7b3a7709d02d305c3d428d2fe
Commit:     9fd9f9b669ca71f7b3a7709d02d305c3d428d2fe
Parent:     d17ecb23b2e5ca174c0f5ce6be42cb3909a02ed0
Author:     Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Mon May 7 11:13:25 2007 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue May 8 01:15:15 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/dm9000.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 8cc1174..0e33853 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -601,7 +601,7 @@ dm9000_probe(struct platform_device *pdev)
        printk("%s: not found (%d).\n", CARDNAME, ret);
 
        dm9000_release_board(pdev, db);
-       kfree(ndev);
+       free_netdev(ndev);
 
        return ret;
 }
@@ -1193,7 +1193,7 @@ dm9000_drv_remove(struct platform_device *pdev)
 
        unregister_netdev(ndev);
        dm9000_release_board(pdev, (board_info_t *) ndev->priv);
-       kfree(ndev);            /* free device structure */
+       free_netdev(ndev);              /* free device structure */
 
        PRINTK1("clean_module() exit\n");
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to