DM9000: fix use of kfree() on net device
Subsystems (2)
PATCH 1/1 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]>
drivers/net/dm9000.c +2 -2
@@ -601,7 +601,7 @@ dm9000_probe(struct platform_device *pdeprintk ("%s: not found (%d).\n" ,CARDNAME , ret);dm9000_release_board (pdev, db); -kfree (ndev); +free_netdev (ndev);return ret; }
@@ -1194,7 +1194,7 @@ dm9000_drv_remove(struct platform_deviceunregister_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 netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jeff Garzik
AppliedQuoted 7 lines · Ben Dooks
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 callfree_netdev().Thanks to Russell King for spotting this.
Signed-off-by Ben Dooks <[email protected]>
applied