These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / net / wireless / orinoco / orinoco_pci.c
index 74219d5..4938a22 100644 (file)
@@ -173,13 +173,15 @@ static int orinoco_pci_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);
 
@@ -203,6 +205,7 @@ static void orinoco_pci_remove_one(struct pci_dev *pdev)
        struct orinoco_private *priv = pci_get_drvdata(pdev);
 
        orinoco_if_del(priv);
+       wiphy_unregister(priv_to_wiphy(priv));
        free_irq(pdev->irq, priv);
        free_orinocodev(priv);
        pci_iounmap(pdev, priv->hw.iobase);