From 55478816db3a4242d714538891a1842634c8ca33 Mon Sep 17 00:00:00 2001 From: Daniil Tatianin <99danilt@gmail.com> Date: Sun, 22 Dec 2024 17:30:39 +0300 Subject: [PATCH] io: make sure the global lock is released for locked IndexField Signed-off-by: Daniil Tatianin <99danilt@gmail.com> --- source/io.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/io.c b/source/io.c index cc35844f..7757cf16 100644 --- a/source/io.c +++ b/source/io.c @@ -209,18 +209,22 @@ static uacpi_status access_field_unit( switch (op) { case UACPI_REGION_OP_READ: - return uacpi_read_field_unit( + ret = uacpi_read_field_unit( field->data, in_out, field->access_width_bytes ); + break; case UACPI_REGION_OP_WRITE: - return uacpi_write_field_unit( + ret = uacpi_write_field_unit( field->data, in_out, field->access_width_bytes ); + break; default: ret = UACPI_STATUS_INVALID_ARGUMENT; - goto out; + break; } + goto out; + default: uacpi_error("invalid field unit kind %d\n", field->kind); ret = UACPI_STATUS_INVALID_ARGUMENT;