|
|
@@ -223,13 +223,15 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
|
|
|
err = orinoco_if_add(priv, 0, 0, NULL);
|
|
|
if (err) {
|
|
|
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
|
|
|
- goto fail;
|
|
|
+ goto fail_wiphy;
|
|
|
}
|
|
|
|
|
|
pci_set_drvdata(pdev, priv);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
+ fail_wiphy:
|
|
|
+ wiphy_unregister(priv_to_wiphy(priv));
|
|
|
fail:
|
|
|
free_irq(pdev->irq, priv);
|
|
|
|
|
|
@@ -263,6 +265,7 @@ static void orinoco_nortel_remove_one(struct pci_dev *pdev)
|
|
|
iowrite16(0, card->bridge_io + 10);
|
|
|
|
|
|
orinoco_if_del(priv);
|
|
|
+ wiphy_unregister(priv_to_wiphy(priv));
|
|
|
free_irq(pdev->irq, priv);
|
|
|
free_orinocodev(priv);
|
|
|
pci_iounmap(pdev, priv->hw.iobase);
|