2021-09-21 02:54:53

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH v2 7/7] PCI: PM: Simplify acpi_pci_power_manageable()

From: Rafael J. Wysocki <[email protected]>

Make acpi_pci_power_manageable() more straightforward.

Signed-off-by: Rafael J. Wysocki <[email protected]>
---

New patch in v2.

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

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)