PCI: Fix pci_register_host_bridge() device_register() error handling
authorRob Herring <robh@kernel.org>
Wed, 13 May 2020 22:38:58 +0000 (17:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:45 +0000 (17:48 +0200)
commitfd2036f8053d1b8294d8bf5d9a91b2130cb7120e
tree254f3aab5e272b5270d73f84c3577d3d34402532
parent91aee019f9ecbabdb8ee623785b9fc48b587073c
PCI: Fix pci_register_host_bridge() device_register() error handling

[ Upstream commit 1b54ae8327a4d630111c8d88ba7906483ec6010b ]

If device_register() has an error, we should bail out of
pci_register_host_bridge() rather than continuing on.

Fixes: 37d6a0a6f470 ("PCI: Add pci_register_host_bridge() interface")
Link: https://lore.kernel.org/r/20200513223859.11295-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/probe.c