From: Igor Russkikh Date: Thu, 19 Oct 2017 15:23:57 +0000 (+0300) Subject: net: aquantia: mmio unmap was not performed on driver removal X-Git-Tag: MMI-PSA29.97-13-9~4501^2~13^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6849540adc0bcc8c648d7c11be169d2ca267fbca;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: aquantia: mmio unmap was not performed on driver removal That may lead to mmio resource leakage. Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c index 727f0a446ef1..cadaa646c89f 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -268,6 +268,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:;