]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Add device even if driver attach failed
authorRajat Jain <rajatja@google.com>
Mon, 6 Jul 2020 23:32:40 +0000 (16:32 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 7 Jul 2020 22:33:41 +0000 (17:33 -0500)
commitc9fc86fd6ab407032c99f789bca0cac7ed238516
treedf020bbf25c0bca7ba6ee5dfc5981e765ba47974
parent1083b3c64fe1e7486c9e2b2841808347129847f7
PCI: Add device even if driver attach failed

device_attach() returning failure indicates a driver error while trying to
probe the device. In such a scenario, the PCI device should still be added
in the system and be visible to the user.

When device_attach() fails, merely warn about it and keep the PCI device in
the system.

This partially reverts 77cd72e8ca9f ("PCI: Check device_attach() return
value always").

Link: https://lore.kernel.org/r/20200706233240.3245512-1-rajatja@google.com
Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org # v4.6+
drivers/pci/bus.c