From: Junchang Wang Date: Fri, 18 Jun 2010 02:02:33 +0000 (+0800) Subject: PCI: check return value of pci_enable_device() when enabling bridges X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2eb5ebd3665a38a4526b45cb3a31a132b2aa9927;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git PCI: check return value of pci_enable_device() when enabling bridges pci_enable_device can fail. In that case, a printed warning would be more appropriate. Signed-off-by: Justin P. Mattock Signed-off-by: Junchang Wang Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 42eea5fbc13b..7f0af0e9b826 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -240,6 +240,8 @@ void pci_enable_bridges(struct pci_bus *bus) if (dev->subordinate) { if (!pci_is_enabled(dev)) { retval = pci_enable_device(dev); + if (retval) + dev_err(&dev->dev, "Error enabling bridge (%d), continuing\n", retval); pci_set_master(dev); } pci_enable_bridges(dev->subordinate);