Skip to content

Commit

Permalink
PCI: PM: Simplify acpi_pci_power_manageable()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Oct 5, 2021
1 parent 98634aa commit f091837
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f091837

Please sign in to comment.