Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bea3c377 authored by Colin Ian King's avatar Colin Ian King Committed by Rafael J. Wysocki
Browse files

ACPI / util: remove redundant check if element is NULL



element is &package->package.elements[i] which can never be NULL
so the check to see if it is NULL is redundant and can be removed.

Detected with static analysis by CoverityScan

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b2ca5dae
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -201,10 +201,6 @@ acpi_extract_package(union acpi_object *package,
		u8 **pointer = NULL;
		u8 **pointer = NULL;
		union acpi_object *element = &(package->package.elements[i]);
		union acpi_object *element = &(package->package.elements[i]);


		if (!element) {
			return AE_BAD_DATA;
		}

		switch (element->type) {
		switch (element->type) {


		case ACPI_TYPE_INTEGER:
		case ACPI_TYPE_INTEGER: