diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-09-20 21:17:39 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-10-05 15:26:23 +0200 |
commit | f09183712146909d56c9555e6901c10cc285339f (patch) | |
tree | 8e0ec9775547568753bc0a52c6042bd4a42b2511 /drivers/pci/pci-acpi.c | |
parent | 98634aa8d837b38d96c06e99022be6b46ed91109 (diff) | |
download | linux-f09183712146909d56c9555e6901c10cc285339f.tar.gz linux-f09183712146909d56c9555e6901c10cc285339f.tar.bz2 linux-f09183712146909d56c9555e6901c10cc285339f.zip |
PCI: PM: Simplify acpi_pci_power_manageable()
Make acpi_pci_power_manageable() more straightforward.
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Ferry Toth <fntoth@gmail.com>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 141ed146e271..9663b13944ad 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -972,9 +972,7 @@ bool acpi_pci_power_manageable(struct pci_dev *dev) { 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) |