net: aquantia: mmio unmap was not performed on driver removal
authorIgor Russkikh <igor.russkikh@aquantia.com>
Thu, 19 Oct 2017 15:23:57 +0000 (18:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Oct 2017 11:32:24 +0000 (12:32 +0100)
That may lead to mmio resource leakage.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c

index 727f0a4..cadaa64 100644 (file)
@@ -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:;