]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: Remove duplicate check for positive return value from probe() functions
authorGabriel Krisman Bertazi <krisman@collabora.co.uk>
Mon, 6 Feb 2017 15:34:14 +0000 (13:34 -0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 10 Feb 2017 21:09:20 +0000 (15:09 -0600)
Function __pci_device_probe() tries to be careful about a PCI driver
probe() hook returning a positive value, but this is not really necessary,
since the same fix up is already done in local_pci_probe() (preceded by a
noisy warning), which renders this instance dead code.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-driver.c

index 1ccce1cd6aca45d183fb65841c8893cbe4fcb029..3e0516ee9eabf9cdaae4264dccd7d5569ef96f40 100644 (file)
@@ -381,8 +381,6 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
                id = pci_match_device(drv, pci_dev);
                if (id)
                        error = pci_call_probe(drv, pci_dev, id);
-               if (error >= 0)
-                       error = 0;
        }
        return error;
 }