aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 8d2d62ff1a37..f1f7acfbf412 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -2695,9 +2695,14 @@ static int qlcnic_is_first_func(struct pci_dev *pdev)
2695 oth_pdev = pci_get_domain_bus_and_slot(pci_domain_nr 2695 oth_pdev = pci_get_domain_bus_and_slot(pci_domain_nr
2696 (pdev->bus), pdev->bus->number, 2696 (pdev->bus), pdev->bus->number,
2697 PCI_DEVFN(PCI_SLOT(pdev->devfn), val)); 2697 PCI_DEVFN(PCI_SLOT(pdev->devfn), val));
2698 if (!oth_pdev)
2699 continue;
2698 2700
2699 if (oth_pdev && (oth_pdev->current_state != PCI_D3cold)) 2701 if (oth_pdev->current_state != PCI_D3cold) {
2702 pci_dev_put(oth_pdev);
2700 return 0; 2703 return 0;
2704 }
2705 pci_dev_put(oth_pdev);
2701 } 2706 }
2702 return 1; 2707 return 1;
2703} 2708}