Re: [PATCH v1 12/16] platform/x86/thinkpad_acpi: Use acpi_dev_for_each_child()

Andy Shevchenko
2022-06-09T15:49:48Z

On Thu, Jun 09, 2022 at 04:09:45PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Instead of walking the list of children of an ACPI device directly,
> use acpi_dev_for_each_child() to carry out an action for all of
> the given ACPI device's children.

...

> + rc = acpi_dev_for_each_child(device, tpacpi_evaluate_bcl, NULL);
> + if (rc > 0)
> + return rc;
>
> + return 0;

It can be simply 'return acpi_dev_for_each_child();', no?

AFAICS the caller is prepared for negative returns.

--
With Best Regards,
Andy Shevchenko