Skip to content
Commit a69bf3c5 authored by Douglas Miller's avatar Douglas Miller Committed by David S. Miller
Browse files

be2net: Don't leak iomapped memory on removal.



The adapter->pcicfg resource is either mapped via pci_iomap() or
derived from adapter->db. During be_remove() this resource was ignored
and so could remain mapped after remove.

Add a flag to track whether adapter->pcicfg was mapped or not, then
use that flag in be_unmap_pci_bars() to unmap if required.

Fixes: 25848c90 ("use PCI MMIO read instead of config read for errors")

Signed-off-by: default avatarDouglas Miller <dougmill@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cec05562
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment