Commit 40c4b1e9 authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by David S. Miller

cxgb4vf: free mac_hlist properly

The locally maintained list for tracking hash mac table was
not freed during driver remove.
Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 24357e06
...@@ -3289,6 +3289,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev, ...@@ -3289,6 +3289,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
static void cxgb4vf_pci_remove(struct pci_dev *pdev) static void cxgb4vf_pci_remove(struct pci_dev *pdev)
{ {
struct adapter *adapter = pci_get_drvdata(pdev); struct adapter *adapter = pci_get_drvdata(pdev);
struct hash_mac_addr *entry, *tmp;
/* /*
* Tear down driver state associated with device. * Tear down driver state associated with device.
...@@ -3339,6 +3340,11 @@ static void cxgb4vf_pci_remove(struct pci_dev *pdev) ...@@ -3339,6 +3340,11 @@ static void cxgb4vf_pci_remove(struct pci_dev *pdev)
if (!is_t4(adapter->params.chip)) if (!is_t4(adapter->params.chip))
iounmap(adapter->bar2); iounmap(adapter->bar2);
kfree(adapter->mbox_log); kfree(adapter->mbox_log);
list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist,
list) {
list_del(&entry->list);
kfree(entry);
}
kfree(adapter); kfree(adapter);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment