summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-09-20 22:17:39 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-10-05 16:26:23 +0300
commitf09183712146909d56c9555e6901c10cc285339f (patch)
tree8e0ec9775547568753bc0a52c6042bd4a42b2511
parent98634aa8d837b38d96c06e99022be6b46ed91109 (diff)
downloadlinux-f09183712146909d56c9555e6901c10cc285339f.tar.xz
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>
-rw-r--r--drivers/pci/pci-acpi.c4
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)