[PATCH] fwts_acpica: skip unneccessary null check
Alex Hung
alex.hung at canonical.com
Sat Jan 15 04:14:58 UTC 2022
Buglink: https://bugs.launchpad.net/bugs/1952671
"context" is always passed as NULL so it should not be used or checked.
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/libfwtsacpica/fwts_acpica.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/libfwtsacpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c
index a0ef1c21..50231464 100644
--- a/src/libfwtsacpica/fwts_acpica.c
+++ b/src/libfwtsacpica/fwts_acpica.c
@@ -313,9 +313,6 @@ static ACPI_STATUS fwts_region_handler(
case AML_FIELD_ATTRIB_BYTES:
case AML_FIELD_ATTRIB_RAW_BYTES:
case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES:
- if (!context)
- return AE_BAD_PARAMETER;
- length = context->AccessLength - 2;
break;
default:
break;
@@ -340,9 +337,6 @@ static ACPI_STATUS fwts_region_handler(
case AML_FIELD_ATTRIB_BYTES:
case AML_FIELD_ATTRIB_RAW_BYTES:
case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES:
- if (!context)
- return AE_BAD_PARAMETER;
- length = context->AccessLength - 2;
break;
default:
break;
--
2.32.0
More information about the fwts-devel
mailing list