[PATCH 5/9] net: aquantia: mmio unmap was not performed on driver removal

AceLan Kao acelan.kao at canonical.com
Tue Nov 7 01:51:59 UTC 2017


From: Igor Russkikh <igor.russkikh at aquantia.com>

BugLink: http://bugs.launchpad.net/bugs/1730544

That may lead to mmio resource leakage.

Signed-off-by: Pavel Belous <pavel.belous at aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh at aquantia.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit 6849540adc0bcc8c648d7c11be169d2ca267fbca)
Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index 4c6c882..dca1b86 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -265,6 +265,9 @@ void aq_pci_func_free(struct aq_pci_func_s *self)
 		aq_nic_ndev_free(self->port[port]);
 	}
 
+	if (self->mmio)
+		iounmap(self->mmio);
+
 	kfree(self);
 
 err_exit:;
-- 
2.7.4





More information about the kernel-team mailing list