summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_lpss.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-08 21:06:04 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-15 10:46:04 +0100
commit6909e0f322b0527fee9fdc54685e6cad69008713 (patch)
tree648ec11fe2fed79a6f13c872dfbab8d93dab506c /drivers/acpi/acpi_lpss.c
parent87824da27b0aee399600d313667c1d812c2749d8 (diff)
ACPI: utils: Return bool from acpi_evaluate_reference()
There are only 4 users of acpi_evaluate_reference() and none of them actually cares about the reason why it fails. All of them are only interested in whether or not it is successful, so it can return a bool value indicating that. Modify acpi_evaluate_reference() as per the observation above and update its callers accordingly so as to get rid of useless code and local variables. The observable behavior of the kernel is not expected to change after this modification of the code. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r--drivers/acpi/acpi_lpss.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 79f4fc7d6871..1623af8d62bc 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -565,16 +565,13 @@ static struct device *acpi_lpss_find_device(const char *hid, const char *uid)
static bool acpi_lpss_dep(struct acpi_device *adev, acpi_handle handle)
{
struct acpi_handle_list dep_devices;
- acpi_status status;
bool ret = false;
int i;
if (!acpi_has_method(adev->handle, "_DEP"))
return false;
- status = acpi_evaluate_reference(adev->handle, "_DEP", NULL,
- &dep_devices);
- if (ACPI_FAILURE(status)) {
+ if (!acpi_evaluate_reference(adev->handle, "_DEP", NULL, &dep_devices)) {
dev_dbg(&adev->dev, "Failed to evaluate _DEP.\n");
return false;
}