From: Dimitris Michailidis Date: Thu, 30 Sep 2010 09:17:12 +0000 (+0000) Subject: cxgb4: remove a bogus PCI function number check X-Git-Tag: firefly_0821_release~7613^2~3670^2~267 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a069ec917457e44e214fc34e50acd185110fa81b;p=firefly-linux-kernel-4.4.55.git cxgb4: remove a bogus PCI function number check 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 4fb08e3c3f38..22169a73b7f7 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -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); }