diff mbox series

[v2,7/7] PCI: PM: Simplify acpi_pci_power_manageable()

Message ID 2024035.bB369e8A3T@kreacher (mailing list archive)
State Not Applicable
Delegated to: Bjorn Helgaas
Headers show
Series PCI: ACPI: Get rid of struct pci_platform_pm_ops and clean up code | expand

Commit Message

Rafael J. Wysocki Sept. 20, 2021, 7:17 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Make acpi_pci_power_manageable() more straightforward.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

New patch in v2.

---
 drivers/pci/pci-acpi.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

Index: linux-pm/drivers/pci/pci-acpi.c
===================================================================
--- linux-pm.orig/drivers/pci/pci-acpi.c
+++ linux-pm/drivers/pci/pci-acpi.c
@@ -969,9 +969,7 @@  bool acpi_pci_power_manageable(struct pc
 {
 	struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
 
-	if (!adev)
-		return false;
-	return acpi_device_power_manageable(adev);
+	return adev && acpi_device_power_manageable(adev);
 }
 
 bool acpi_pci_bridge_d3(struct pci_dev *dev)