Make acpi_dev_get_first_consumer_dev_cb() a bit more straightforward
and rewrite the comment in it.
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
struct acpi_device *adev;
adev = acpi_bus_get_acpi_device(dep->consumer);
- if (!adev)
- /* If we don't find an adev then we want to continue parsing */
- return 0;
-
- *(struct acpi_device **)data = adev;
-
- return 1;
+ if (adev) {
+ *(struct acpi_device **)data = adev;
+ return 1;
+ }
+ /* Continue parsing if the device object is not present. */
+ return 0;
}
static int acpi_scan_clear_dep(struct acpi_dep_data *dep, void *data)