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;