]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Merge remote-tracking branch 'net-next/master'
[karo-tx-linux.git] / drivers / net / ethernet / chelsio / cxgb4 / cxgb4_main.c
index 0d0665ca6f1914f77fa3aa23b68254d42fcd0c86..8b929eeecd2d37cd3b41e32d57bd1fa50402a230 100644 (file)
@@ -3983,6 +3983,7 @@ static int cxgb4_inet6addr_handler(struct notifier_block *this,
        struct net_device *event_dev;
        int ret = NOTIFY_DONE;
        struct bonding *bond = netdev_priv(ifa->idev->dev);
+       struct list_head *iter;
        struct slave *slave;
        struct pci_dev *first_pdev = NULL;
 
@@ -3995,7 +3996,7 @@ static int cxgb4_inet6addr_handler(struct notifier_block *this,
                 * in all of them only once.
                 */
                read_lock(&bond->lock);
-               bond_for_each_slave(bond, slave) {
+               bond_for_each_slave(bond, slave, iter) {
                        if (!first_pdev) {
                                ret = clip_add(slave->dev, ifa, event);
                                /* If clip_add is success then only initialize
@@ -6074,7 +6075,6 @@ sriov:
        pci_disable_device(pdev);
  out_release_regions:
        pci_release_regions(pdev);
-       pci_set_drvdata(pdev, NULL);
        return err;
 }
 
@@ -6122,7 +6122,6 @@ static void remove_one(struct pci_dev *pdev)
                pci_disable_pcie_error_reporting(pdev);
                pci_disable_device(pdev);
                pci_release_regions(pdev);
-               pci_set_drvdata(pdev, NULL);
        } else
                pci_release_regions(pdev);
 }
@@ -6149,8 +6148,10 @@ static int __init cxgb4_init_module(void)
                pr_warn("could not create debugfs entry, continuing\n");
 
        ret = pci_register_driver(&cxgb4_driver);
-       if (ret < 0)
+       if (ret < 0) {
                debugfs_remove(cxgb4_debugfs_root);
+               destroy_workqueue(workq);
+       }
 
        register_inet6addr_notifier(&cxgb4_inet6addr_notifier);