The check for slot reset capable, pci_probe_reset_slot, returns 0 when slot reset is possible, but pci_reset_bus was proceeding to reset the slot when the probe returned an error. This patch reverses the check to fix that logic. Signed-off-by: Keith Busch <keith.busch@xxxxxxxxx> --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 29ff9619b5fa..bc8419e0065a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5200,7 +5200,7 @@ static int __pci_reset_bus(struct pci_bus *bus) */ int pci_reset_bus(struct pci_dev *pdev) { - return pci_probe_reset_slot(pdev->slot) ? + return !pci_probe_reset_slot(pdev->slot) ? __pci_reset_slot(pdev->slot) : __pci_reset_bus(pdev->bus); } EXPORT_SYMBOL_GPL(pci_reset_bus); -- 2.14.4