• Shannon Nelson's avatar
    ionic: check before releasing pci regions · a36b0787
    Shannon Nelson authored
    AER recovery handler can trigger a PCI Reset after tearing
    down the device setup in the error detection handler.  The PCI
    Reset handler will also attempt to tear down the device setup,
    and this second tear down needs to know that it doesn't need
    to call pci_release_regions() a second time.  We can clear
    num_bars on tear down and use that to decide later if we need
    to clear the resources.  This prevents a harmless but disturbing
    warning message
        resource: Trying to free nonexistent resource <0xXXXXXXXXXX-0xXXXXXXXXXX>
    
    Fixes: c3a910e1 ("ionic: fill out pci error handlers")
    Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
    Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    a36b0787
ionic_bus_pci.c 11.4 KB