]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix faulty logic in pci_reset_bus()
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Wed, 5 Sep 2018 16:08:03 +0000 (16:08 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 12 Sep 2018 02:44:52 +0000 (21:44 -0500)
commitbe08c8ce5d95736670377ce1df9a9c3a7fc14222
treefd6983c4d7a420afcc58a81be14f1ccabe5a3a4c
parentf7da88848af094f9d2ceed55a4b9805b3c086da4
PCI: Fix faulty logic in pci_reset_bus()

The pci_reset_bus() function calls pci_probe_reset_slot() to determine
whether to call the slot or bus reset.  The check has faulty logic in that
it does not account for pci_probe_reset_slot() being able to return an
errno.  Fix by only calling the slot reset when the function returns 0.

Fixes: 8fafcc60750c ("PCI: Unify try slot and bus reset API")
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Cc: Sinan Kaya <okaya@codeaurora.org>
drivers/pci/pci.c