summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-09-20 21:17:39 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-10-05 15:26:23 +0200
commitf09183712146909d56c9555e6901c10cc285339f (patch)
tree8e0ec9775547568753bc0a52c6042bd4a42b2511 /drivers/pci
parentPCI: PM: Drop struct pci_platform_pm_ops (diff)
downloadlinux-f09183712146909d56c9555e6901c10cc285339f.tar.xz
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')
-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)