summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/acpi_pcihp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-02 08:28:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-02 08:28:32 +0200
commit714c95ce8bad7a2042006fc9a2079fcd469b6a03 (patch)
treecdf9f5a6fcbb389f555584ef64ee911eefeb1777 /drivers/pci/hotplug/acpi_pcihp.c
parentaaf3f4e925dc2bdc4715142103660285632a245c (diff)
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063 (diff)
Merge 4.18-rc3 into usb-next
We want the USB and other fixes in here as well to make merges and testing easier. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci/hotplug/acpi_pcihp.c')
-rw-r--r--drivers/pci/hotplug/acpi_pcihp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c
index 3979f89b250a..5bd6c1573295 100644
--- a/drivers/pci/hotplug/acpi_pcihp.c
+++ b/drivers/pci/hotplug/acpi_pcihp.c
@@ -7,7 +7,6 @@
* All rights reserved.
*
* Send feedback to <kristen.c.accardi@intel.com>
- *
*/
#include <linux/module.h>
@@ -87,8 +86,17 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
return 0;
/* If _OSC exists, we should not evaluate OSHP */
+
+ /*
+ * If there's no ACPI host bridge (i.e., ACPI support is compiled
+ * into the kernel but the hardware platform doesn't support ACPI),
+ * there's nothing to do here.
+ */
host = pci_find_host_bridge(pdev->bus);
root = acpi_pci_find_root(ACPI_HANDLE(&host->dev));
+ if (!root)
+ return 0;
+
if (root->osc_support_set)
goto no_control;