cxgb4: remove a bogus PCI function number check
authorDimitris Michailidis <dm@chelsio.com>
Thu, 30 Sep 2010 09:17:12 +0000 (09:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Oct 2010 05:07:02 +0000 (22:07 -0700)
Remove a bogus PCI function number check from the driver's .remove
method that causes pci_release_regions not to be called for function 0
if additional functions are attached and one of them is used as primary.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb4/cxgb4_main.c

index 4fb08e3c3f3888227c630f61c0a944cfa3320a94..22169a73b7f72fb16cc80ab4f4ce049a0dbd9a82 100644 (file)
@@ -3863,7 +3863,7 @@ static void __devexit remove_one(struct pci_dev *pdev)
                pci_disable_device(pdev);
                pci_release_regions(pdev);
                pci_set_drvdata(pdev, NULL);
-       } else if (PCI_FUNC(pdev->devfn) > 0)
+       } else
                pci_release_regions(pdev);
 }