ACPI: LPSS: Replace loop with first entry retrieval
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 29 Aug 2022 14:11:28 +0000 (17:11 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 Sep 2022 18:51:07 +0000 (20:51 +0200)
commitda13b3361bb609f5e3fde3f57b8e2b42001513a3
tree4746b6b2d230b43e1342d73c1c867de6e12e7476
parent6e5cbe7c4b41824e500acbb42411da692d1435f1
ACPI: LPSS: Replace loop with first entry retrieval

After the commit 6505e452371d ("ACPI: LPSS: Use the helper
acpi_dev_get_memory_resources()") the list is empty or
contains only resource of IORESOURCE_MEM type. Hence, no
need to check for the type, and since we break after the
first found, no need to iterate over full list. That said,
replace loop with first entry retrieval.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_lpss.c