mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
ionic: prevent pci disable of already disabled device
If a reset fails, the PCI device is left in a disabled state, so don't try to disable it again on driver remove. This prevents a scary looking WARN trace in the kernel log. ionic 0000:2b:00.0: disabling already-disabled device Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ca5fdf9a7c
commit
13943d6c82
1 changed files with 3 additions and 1 deletions
|
@ -217,6 +217,8 @@ static void ionic_clear_pci(struct ionic *ionic)
|
|||
{
|
||||
ionic_unmap_bars(ionic);
|
||||
pci_release_regions(ionic->pdev);
|
||||
|
||||
if (atomic_read(&ionic->pdev->enable_cnt) > 0)
|
||||
pci_disable_device(ionic->pdev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue