Skip to contentSkip to conversation

tulip/xircom initialization bug

PATCH In review Stephen Hemminger 2 participants 2 messages Jun 4, 2003 – Jun 5, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tulip/xircom initialization bug

By inspection of device initialization code, this driver unregister's the net device in the error path even though the register_netdevice never succeeded.

Compiles, but don't have the hardware.

drivers/net/tulip/xircom_tulip_cb.c +0 -1
diff -Nru a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c
@@ -648,7 +648,6 @@
 	pci_set_drvdata(pdev, NULL);
 	pci_release_regions(pdev);
 err_out_free_netdev:
-	unregister_netdev(dev);
 	kfree(dev);
 	return -ENODEV;
 }
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Wed, 4 Jun 2003 11:21:36 -0700

By inspection of device initialization code, this driver unregister's the net device in the error path even though the register_netdevice never succeeded.

This is fully legal, unregister_netdevice() checks for existence of the netdev in the device list and if not found it returns an error.

This severely simplifies error path handling while we convert all these drivers away from init_etherdev().