From nobody Sat Jun 13 17:00:42 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42A213E1201 for ; Wed, 6 May 2026 09:29:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778059782; cv=none; b=cJaXbZsWXDflWoIq2yqBupfvCZvaAx1HCX1bzNs/lBP2+rMHYYu6SJzuOh/TPevQwpNltdn7uJQzJ3YnD6WHfB8hHb6tsbtBnVtXkd3Xu11WqyE7zN8Oafa+1Igfs8XUjJh2tCke85k6CYny+kCf1Zm4OgCLHwlidXF9R36bJA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778059782; c=relaxed/simple; bh=b6KDebbwB9y2ayWmTDcDF7ZXzrnROwC7atimGy8vf0g=; h=Message-ID:Date:MIME-Version:To:From:Subject:Cc:Content-Type; b=gCk57Wm9Cpvd3vbB+CnQICzaVB5RQ3VbZGCiOwTkjq1C4axV2fMSVIMWST44SkULnnK4heliMnpowk8Yd7eUcjfYcN6Yiu+jYVNGRDrQc2WN6hZWDf6ehFQHxpAmgkfGtFLXujHGrAE+jaUKAjUWqBQZcWxNDK0sFgDZXzfbowk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BjGFkPW/; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BjGFkPW/" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-488ba840146so54329585e9.1 for ; Wed, 06 May 2026 02:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778059778; x=1778664578; darn=vger.kernel.org; h=content-transfer-encoding:cc:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=U/I8gmtTJP4V7dsNote1TQ7GwmlIxPNJ693ojN9z7bA=; b=BjGFkPW/6bSGbXo3NSVroU6XqXBQIXXcmCw+xNmUY3StCPVICQornGq/IpS7rY29ej hvseDjPgmP9O9TTpsoFB7uQ8rLgsLKsylGyg2MzPBPdOc7ZoEfmFu/CGLF8YcoUzRP5V meJauL5a2/a0bc0vwlrce915K4tgqG3gU5qeQEXE6svMBvKibSPKpFdUSFjtcVYZzrg1 AJW4Pihm6bTj94XL691TOLRAXv25NPV9Y5SMvvhTqP5rmPtNwZfR6fQ5ShGxwoio1AZS E+9rJNb7SF+MlSuhr0SxpyZZRFm1yaorVkga1MeBExBnEeU5zrXJsfeOZ7ziHV6NcBiL omaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778059778; x=1778664578; h=content-transfer-encoding:cc:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U/I8gmtTJP4V7dsNote1TQ7GwmlIxPNJ693ojN9z7bA=; b=K/c3tT7/imDjaeWNb+ZzBRXZq7VM5AE5Dmd6691AgFMm9V5/Pp9oh1gu23SU3H90Wk tYMqKIUdb9gBZ0J2bOCNcUr5r1N/WJujGknDDe7j7mpHlWPB7HrxtNaRyPX/FLubZQkj Nry80wxLrVmHDFPH+73t8y8527NNNWKm9X+mGdp9+CVC20S1/Xu5ZXGbvWWlLx3fWlfD 9YBtu8LiYHu5UZJIDaQwaXMKgmXAHWSA0jvsdtM+Nt4Ecd94vf9cnJL5Nav6QJpHJcx9 r5pp2dxtmBeHYZf+B+OWIpGdgs/bBpXI5zj0ZP+21ZrpUH+qeaQAJWpqHovSsKBnu+CD JpCw== X-Forwarded-Encrypted: i=1; AFNElJ/lo+oaYQsXe6OtjuwFocQ+XpGRBEDCpFFIp4PpJJ/6iWRUD0OvCgmvys7jBDknWNDjR+67NXw/UqzYtrw=@vger.kernel.org X-Gm-Message-State: AOJu0Yzac4gG4Q1fJxJ4c3cHrZSYt8Ah/DRjSoa8b2FBplqFtqVwPPoW IiNwf9RDgF6H9MDwuXdCFRx5eVkky9fGuARWCMd65/WD7DHpLlOxt78z X-Gm-Gg: AeBDiet4kDgIcmAh2CIBxXzngXF7iEL3fICmXP0X+JjRVmcrDKB4RZzjGb5gwGdO2JO Wlq3LBAxSuCUADN91+cTKnNT4iEQx9qiwuVrM6jwA3k39zZx7+g8j/j8jPTftoximPZtCZziS91 7wchtuYuxr3q891gN5F+kd1VQiRKllXWCVNz11pp8UhI8Yt8F4VVYhJjAFuwjcc3OVkdoua25Zr q3I9Hb2PwtJPQJ5e3KnmXJdztNNTQRBA6DKqAOIqUNFdIGOEiIQdp34mPuQo+aSiB3FQrW4h0WV SfTDSUolkoMOD3vhVau9oU7H/fYYoyZvJx4Q8NNC+Mob4SrZexEKkcVVNIhP3D11sY2iZavEdGF uLp2LVLAvicYPWU+vTAXrGPcQgxrSKDoBpnaLbHt7nBjQQg/NHIuyndPWj3zppUab+o1x8nzMPt qmM2Kqz+WJIC39aORfr4sD9m71OMi3bR0b66yhBFGQv2Q5WTZo9iY8jRsNcJiTMFtaThSt5vNbd y4UEKM= X-Received: by 2002:a05:600c:34ca:b0:489:1f08:91b with SMTP id 5b1f17b1804b1-48e521e6085mr44681375e9.16.1778059777373; Wed, 06 May 2026 02:29:37 -0700 (PDT) Received: from ?IPV6:2a01:e11:202b:40:68b1:8d59:e348:c16e? ([2a01:e11:202b:40:68b1:8d59:e348:c16e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e538a547bsm38017295e9.5.2026.05.06.02.29.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 May 2026 02:29:36 -0700 (PDT) Message-ID: <59174ed2-dc3a-4891-929f-bf513deecdc2@gmail.com> Date: Wed, 6 May 2026 11:29:36 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: mika.westerberg@linux.intel.com, mathias.nyman@linux.intel.com From: Marco Scardovi Subject: [PATCH] gpio: acpi: modernize resource management using cleanup.h Cc: linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: quoted-printable Hi everyone, I was looking for ways to switch to modern cleanup guards and auto-freeing pointers to simplify error paths and synchronization in gpiolib-acpi-core.c so I came up with the patch you can find below. Here you can see the main points I've worked on: - Use DEFINE_FREE() for gpio_desc and ACPI resources. - Use guard(mutex)() within the OpRegion handler loop for automatic locking. - Use __free() for automatic descriptor and memory cleanup. - Fix off-by-one error in GPIO pin bounds check. - Return AE_OK on out-of-range pins to allow processing other resources =C2=A0 even if one is misconfigured in firmware. - Use break instead of goto in OpRegion handler for cleaner control flow =C2=A0 leveraging auto-cleanup. I've tested it (both build and functionality) against linux-next-20260430. Signed-off-by: Marco Scardovi --- =C2=A0drivers/gpio/gpiolib-acpi-core.c | 94=20 +++++++++++++++++++--------------------- =C2=A01 file changed, 43 insertions(+), 51 deletions(-) diff --git a/drivers/gpio/gpiolib-acpi-core.c=20 b/drivers/gpio/gpiolib-acpi-core.c index eb8a40cfb7a9..19a18222b7b2 100644 --- a/drivers/gpio/gpiolib-acpi-core.c +++ b/drivers/gpio/gpiolib-acpi-core.c @@ -7,6 +7,9 @@ =C2=A0 *=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Mika Westerberg =C2=A0 */ +#include +#include + =C2=A0#include =C2=A0#include =C2=A0#include @@ -23,6 +26,16 @@ =C2=A0#include "gpiolib.h" =C2=A0#include "gpiolib-acpi.h" +DEFINE_FREE(free_gpio_desc, struct gpio_desc *, { +=C2=A0 =C2=A0 if (_T) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 gpiochip_free_own_desc(_T); +}) + +DEFINE_FREE(acpi_free, void *, { +=C2=A0 =C2=A0 if (_T) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ACPI_FREE(_T); +}) + =C2=A0/** =C2=A0 * struct acpi_gpio_event - ACPI GPIO event handler data =C2=A0 * @@ -361,6 +374,7 @@ static acpi_status acpi_gpiochip_alloc_event(struct=20 acpi_resource *ares, =C2=A0 =C2=A0 =C2=A0struct acpi_gpio_event *event; =C2=A0 =C2=A0 =C2=A0irq_handler_t handler =3D NULL; =C2=A0 =C2=A0 =C2=A0struct gpio_desc *desc; +=C2=A0 =C2=A0 struct gpio_desc *desc_guard __free(free_gpio_desc) =3D NULL; =C2=A0 =C2=A0 =C2=A0unsigned int pin; =C2=A0 =C2=A0 =C2=A0int ret, irq; @@ -370,6 +384,11 @@ static acpi_status acpi_gpiochip_alloc_event(struct=20 acpi_resource *ares, =C2=A0 =C2=A0 =C2=A0handle =3D ACPI_HANDLE(chip->parent); =C2=A0 =C2=A0 =C2=A0pin =3D agpio->pin_table[0]; +=C2=A0 =C2=A0 if (pin >=3D chip->ngpio) { +=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, "Failed to request GPIO = for pin 0x%04X,=20 out of range\n", pin); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return AE_OK; +=C2=A0 =C2=A0 } + =C2=A0 =C2=A0 =C2=A0if (pin <=3D 255) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0char ev_name[8]; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sprintf(ev_name, "_%c%02X", @@ -392,31 +411,26 @@ static acpi_status=20 acpi_gpiochip_alloc_event(struct acpi_resource *ares, =C2=A0 =C2=A0 =C2=A0desc =3D acpi_request_own_gpiod(chip, agpio, 0, "ACPI:= Event"); =C2=A0 =C2=A0 =C2=A0if (IS_ERR(desc)) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to request GPIO for pin = 0x%04X, err %pe\n", -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pin, desc); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, "Failed to request GPIO = for pin 0x%04X,=20 err %pe\n", pin, desc); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return AE_OK; =C2=A0 =C2=A0 =C2=A0} +=C2=A0 =C2=A0 desc_guard =3D desc; =C2=A0 =C2=A0 =C2=A0ret =3D gpiochip_lock_as_irq(chip, pin); =C2=A0 =C2=A0 =C2=A0if (ret) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to lock GPIO pin 0x%04X = as interrupt, err %d\n", -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pin, ret); -=C2=A0 =C2=A0 =C2=A0 =C2=A0 goto fail_free_desc; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, "Failed to lock GPIO pin= 0x%04X as=20 interrupt, err %d\n", pin, ret); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return AE_OK; =C2=A0 =C2=A0 =C2=A0} =C2=A0 =C2=A0 =C2=A0irq =3D gpiod_to_irq(desc); =C2=A0 =C2=A0 =C2=A0if (irq < 0) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to translate GPIO pin 0x= %04X to IRQ, err %d\n", -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pin, irq); -=C2=A0 =C2=A0 =C2=A0 =C2=A0 goto fail_unlock_irq; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(chip->parent, "Failed to translate GPI= O pin 0x%04X to=20 IRQ, err %d\n", pin, irq); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 goto err_unlock; =C2=A0 =C2=A0 =C2=A0} =C2=A0 =C2=A0 =C2=A0event =3D kzalloc_obj(*event); =C2=A0 =C2=A0 =C2=A0if (!event) -=C2=A0 =C2=A0 =C2=A0 =C2=A0 goto fail_unlock_irq; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 goto err_unlock; =C2=A0 =C2=A0 =C2=A0event->irqflags =3D IRQF_ONESHOT; =C2=A0 =C2=A0 =C2=A0if (agpio->triggering =3D=3D ACPI_LEVEL_SENSITIVE) { @@ -444,17 +458,15 @@ static acpi_status=20 acpi_gpiochip_alloc_event(struct acpi_resource *ares, =C2=A0 =C2=A0 =C2=A0event->irq =3D irq; =C2=A0 =C2=A0 =C2=A0event->irq_is_wake =3D acpi_gpio_irq_is_wake(chip->par= ent, agpio); =C2=A0 =C2=A0 =C2=A0event->pin =3D pin; -=C2=A0 =C2=A0 event->desc =3D desc; +=C2=A0 =C2=A0 /* Transfer ownership to event, prevent auto-free */ +=C2=A0 =C2=A0 event->desc =3D no_free_ptr(desc_guard); =C2=A0 =C2=A0 =C2=A0list_add_tail(&event->node, &acpi_gpio->events); =C2=A0 =C2=A0 =C2=A0return AE_OK; -fail_unlock_irq: +err_unlock: =C2=A0 =C2=A0 =C2=A0gpiochip_unlock_as_irq(chip, pin); -fail_free_desc: -=C2=A0 =C2=A0 gpiochip_free_own_desc(desc); - =C2=A0 =C2=A0 =C2=A0return AE_OK; =C2=A0} @@ -1086,7 +1098,7 @@ acpi_gpio_adr_space_handler(u32 function,=20 acpi_physical_address address, =C2=A0 =C2=A0 =C2=A0struct acpi_gpio_chip *achip =3D region_context; =C2=A0 =C2=A0 =C2=A0struct gpio_chip *chip =3D achip->chip; =C2=A0 =C2=A0 =C2=A0struct acpi_resource_gpio *agpio; -=C2=A0 =C2=A0 struct acpi_resource *ares; +=C2=A0 =C2=A0 struct acpi_resource *ares __free(acpi_free) =3D NULL; =C2=A0 =C2=A0 =C2=A0u16 pin_index =3D address; =C2=A0 =C2=A0 =C2=A0acpi_status status; =C2=A0 =C2=A0 =C2=A0int length; @@ -1097,20 +1109,17 @@ acpi_gpio_adr_space_handler(u32 function,=20 acpi_physical_address address, =C2=A0 =C2=A0 =C2=A0if (ACPI_FAILURE(status)) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return status; -=C2=A0 =C2=A0 if (WARN_ON(ares->type !=3D ACPI_RESOURCE_TYPE_GPIO)) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 ACPI_FREE(ares); +=C2=A0 =C2=A0 if (WARN_ON(ares->type !=3D ACPI_RESOURCE_TYPE_GPIO)) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return AE_BAD_PARAMETER; -=C2=A0 =C2=A0 } =C2=A0 =C2=A0 =C2=A0agpio =3D &ares->data.gpio; =C2=A0 =C2=A0 =C2=A0if (WARN_ON(agpio->io_restriction =3D=3D ACPI_IO_RESTR= ICT_INPUT && -=C2=A0 =C2=A0 =C2=A0 =C2=A0 function =3D=3D ACPI_WRITE)) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 ACPI_FREE(ares); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 function =3D=3D ACPI_WRITE)) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return AE_BAD_PARAMETER; -=C2=A0 =C2=A0 } =C2=A0 =C2=A0 =C2=A0length =3D min(agpio->pin_table_length, pin_index + bi= ts); +=C2=A0 =C2=A0 status =3D AE_OK; =C2=A0 =C2=A0 =C2=A0for (i =3D pin_index; i < length; ++i) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unsigned int pin =3D agpio->pin_table[i]; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct acpi_gpio_connection *conn; @@ -1118,7 +1127,7 @@ acpi_gpio_adr_space_handler(u32 function,=20 acpi_physical_address address, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0u16 word, shift; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bool found; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 mutex_lock(&achip->conn_lock); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 guard(mutex)(&achip->conn_lock); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0found =3D false; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0list_for_each_entry(conn, &achip->conns,= node) { @@ -1150,17 +1159,15 @@ acpi_gpio_adr_space_handler(u32 function,=20 acpi_physical_address address, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!found) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0desc =3D acpi_request_own_= gpiod(chip, agpio, i,=20 "ACPI:OpRegion"); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (IS_ERR(desc)) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mutex_unlock(&achi= p->conn_lock); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0status =3D A= E_ERROR; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0conn =3D kzalloc_obj(*conn= ); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!conn) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gpiochip_fre= e_own_desc(desc); -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mutex_unlock(&achi= p->conn_lock); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0status =3D A= E_NO_MEMORY; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0conn->pin =3D pin; @@ -1168,8 +1175,6 @@ acpi_gpio_adr_space_handler(u32 function,=20 acpi_physical_address address, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0list_add_tail(&conn->node,= &achip->conns); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} -=C2=A0 =C2=A0 =C2=A0 =C2=A0 mutex_unlock(&achip->conn_lock); - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * For the cases when OperationRegion() = consists of more than =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * 64 bits calculate the word and bit sh= ift to use that one to @@ -1188,8 +1193,6 @@ acpi_gpio_adr_space_handler(u32 function,=20 acpi_physical_address address, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} =C2=A0 =C2=A0 =C2=A0} -out: -=C2=A0 =C2=A0 ACPI_FREE(ares); =C2=A0 =C2=A0 =C2=A0return status; =C2=A0}